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
• C++
• Re: refresh parent after closing pop up window
• Dynamic Insertion
• Date and Time function around the world???
• Significant Factors
• Perl array access
• Re: huffman encoding and decoding in C++...
• Perl One Liner: Replace {(
• Re: html including php, accessing the functions


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-2009