http://qs1969.pair.com?node_id=11127827


in reply to Re^2: Renaming all files in a directory
in thread Renaming all files in a directory

In this example, perl is reading line by line, (perl -nle ...) and you want the counter to only be initialized (once) at the start of the script.