Perl Monk, Perl Meditation | |
PerlMonks |
Re: Rename File Name in Arrayby rhesa (Vicar) |
on Jul 20, 2008 at 11:22 UTC ( [id://698911]=note: print w/replies, xml ) | Need Help?? |
It "doesn't work", because $ext is reset to "A" on every iteration. You need to declare and initialize that variable outside the loop.
To update $x->[0] after the rename, simply do $x->[0] = "USB" . $ext;.
In Section
Seekers of Perl Wisdom
|
|