my $fh = param('FILENAME'); while (<$fh>) { do_stuff_with($_); # manipulate the file line by line }