c has asked for the wisdom of the Perl Monks concerning the following question:
@array = glob(*.old); while(<@array>) { $newext = $_; $newext =~ s/old/new/; rename($_, $newext); }
I think I have this pretty short, however, I've learned that often there are shorter and easier ways to do something. If anyone can point out a shorter path to the goal I seek, it would be appreciated.
humbly -c
|
---|
Replies are listed 'Best First'. | |
---|---|
Re (tilly) 1: rename files in directory with new extenstion
by tilly (Archbishop) on Aug 09, 2001 at 08:42 UTC | |
Re: rename files in directory with new extenstion
by damian1301 (Curate) on Aug 09, 2001 at 08:37 UTC | |
Re: rename files in directory with new extenstion
by Hofmator (Curate) on Aug 09, 2001 at 18:29 UTC | |
Re: rename files in directory with new extenstion
by mugwumpjism (Hermit) on Aug 09, 2001 at 18:14 UTC | |
Re: rename files in directory with new extenstion
by George_Sherston (Vicar) on Aug 09, 2001 at 23:09 UTC | |
by mischief (Hermit) on Aug 09, 2001 at 23:12 UTC | |
Re: rename files in directory with new extenstion
by George_Sherston (Vicar) on Aug 09, 2001 at 23:19 UTC |