# Code sample 3 -- minor changes from the original "foreach" # loop (Code sample 1) foreach (@array) { printf "%3d. %s\n", $loopcount + 1, $_; }