Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

RE: RE: Odd file rename

by t0mas (Priest)
on Jun 14, 2000 at 17:19 UTC ( #18088=note: print w/replies, xml ) Need Help??


in reply to RE: Odd file rename
in thread Odd file rename

I really can't see your problem with that. Try:
my @fileList=("F1234","F2345","F3456"); foreach $oldname (@fileList) { $newname=$oldname; $newname=~ s/^./B/i; rename($oldname,$newname) };
(credits for regexp to lhoward)

/brother t0mas

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2021-05-16 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (151 votes). Check out past polls.

    Notices?