the_slycer has asked for the wisdom of the Perl Monks concerning the following question:
my @files = <file_name.*>; foreach (reverse @files) { my $temp = $1 if /.*\.([0-6])$/; $temp++; my $old = $_; s/(.*\.)[0-6]$/$1$temp/; rename $old, $_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: More efficient way of incrementing files?
by japhy (Canon) on Jul 24, 2001 at 10:16 UTC | |
by the_slycer (Chaplain) on Jul 24, 2001 at 10:25 UTC | |
|
Re: More efficient way of incrementing files?
by miyagawa (Chaplain) on Jul 24, 2001 at 10:54 UTC |