Help for this page
open my $ifh, '<', $file or die $!; chomp( my @a = <$ifh> ); ... print $ofh $_,"\n" for @a; close $ofh; # vs. untie @a;
use Path::Class qw/file/; my @a = file($file)->slurp(chomp=>1); ... file($file)->spew_lines(\@a);