codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  simplified the file`s name using Perl language  jim520 at 08:38 on Monday, June 30, 2008
 

i'm beginner in perl programming here, and i hope i can learn a lots from here. thanks.
below is my question:

i have the filename as below:
news_abc_def.txt
news_adee_pusjkekk.txt
news_ooe_ddd.txt
.
. (about 10 files)
news_www_ccc.txt ...and so on.

the pattern of the filename like news_xxxx_xxxx.txt

and i wish to simplified the name of the file as below:
news_abc_def.txt >> FL00001.txt
news_adee_pusjkekk.txt >> FL00002.txt
news_ooe_ddd.txt >> FL00003.txt
news_www_ccc.txt >> FL00010.txt (p/s: only 7 character)

can any1 help to figure out tis problem ..? thanks.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Passing Data from One Script to Another
•  untie attempted while 1 inner references still exist
•  Web Hosting
•  Re: refresh parent after closing pop up window
•  [Help] Javascript Quiz
•  Page scrolls to top when hiding or showing a div
•  Site disconnects unexpectedly
•  Re: dynamic crystal report generation
•  px to cm or reverse converting


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2008