- or download this
# ouch
open(my $fh, '>', 'data.tmp') or die("open failed: $!");
...
open(my $fh, '<', 'data.tmp') or die("open failed: $!");
chomp( my @template_txt = <$fh> );
close($fh);
- or download this
# major ouch
open(my $fh, '>', 'data.tmp') or die("open failed: $!");
...
open(my $fh, '<', 'data.tmp') or die("open failed: $!");
chomp( my @template_txt = <$fh> );
close($fh);
- or download this
# one line per array entry, no ouch
my @template_txt = split( /\n/, $template->output() );
# all in one scalar, no ouch
my $template_txt = $template->output();