in reply to Mass file renaming

Like this?

print for map { $_ - 9900 } 22200010001, 22200010101, 22200010102, 22200010103, 22200010201;; 22200000101 22200000201 22200000202 22200000203 22200000301

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

Replies are listed 'Best First'.
Re^2: Mass file renaming
by ikegami (Patriarch) on Jul 19, 2005 at 20:54 UTC

    If both the new and the old value at the same time (e.g. if you want to call rename), the soluton in this post's parent can be refactored as:

    @old_names = ( 22200010001, 22200010101, 22200010102, 22200010103, 22200010201 ); foreach (@old_names) { my $old_name = $_; my $new_name = $_ - 9900; ... do something ... }