in reply to renaming a list of files

You've got a LOT of broken code in there. First of all, your 'ls' isn't working. Try: @array = ls '*.jpg' instead. Next, to get the total number of files, just use @array, not @array + 1. And then your for loop should be going one less iteration than you've written ($loop < @array). Your assignment to $new gives me a headache; use: $new = "snowscene.$padder$loop.jpg". Finally, your assignment to $old is broken; use: $old = $array[$loop].

You need to step back and look at some introductory Perl material; I have a feeling you're learning Perl from the wrong sources.


Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart