in reply to Opening files
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.$input_file="/home/foo/foo_file.txt"; open (INFILE, $input_file) || die "Could not open $input_file\n"; while(<INFILE>){ print $_; } close INFILE;
|
|---|