in reply to Re^2: How to modify a file
in thread How to modify a file

$outfile is the filename. You need to use the file handle $out.

say $out $text;

poj