... #open(OUT, ">${pathName}html") or die "Couldn't open file file.txt, $!"; ... print OUT $line; ...