Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

I have a folder which is having 1200 files,all the file names are have maximum of 8 character length.I need to remove last character from each of the filnames and prefix it with character "A"

by perladdict (Chaplain)
on Feb 20, 2013 at 18:35 UTC ( #1019820=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    $dir = "C:\\Users\\user\\Desktop\\test";
    ...
    @files = sort grep (!/^\.$|^\.\.$/, readdir(DIR));
    closedir (DIR);
    print "@files\n";
    
  2. or download this
    
    PBILLSTA.doc
    ...
    P537_LC.doc
    AODG.doc
    MAD004PN.doc
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1019820]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2014-07-29 04:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls