Help for this page
open my $in, '<', 'input.txt' or die; open my $out, '>', 'output.txt' or die; ... print $out $buf; } close $_ for ($in, $out);