in reply to How to Put a Loop in my 1st Program

Rather than give a working copy, here is something to point you in the right direction :

while (my $line = <FILES>) { # open the file ($line) as DATA # manipulate the file # close(DATA); } close(FILES);

i had a memory leak once, and it ruined my favorite shirt.