Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I want to loop thru a directory of files and change each file's name to the iterator's number. so, in some kind of pseudocode:

while not ren the last file in the dir get the next file's file name "and" rename the file end of while

A snippet of code would help - be a blessing. Thanks