in reply to Opening files

Here's a snippet to open a file, and print the contents:
$input_file="/home/foo/foo_file.txt"; open (INFILE, $input_file) || die "Could not open $input_file\n"; while(<INFILE>){ print $_; } close INFILE;
Note that there are several operators, which determine how the file is treated. If you wish to just read, no special operator is needed. If you wish to append to a file, specify the name as $somefile=">>/home/foo/foo_file.txt". Research the "open" function for additional modifiers and usage.