- or download this
sub slurp {
my $file = shift or return undef;
...
close FOO;
return \$buffer;
}
- or download this
my $content = slurp( $file ) or die "Failed to load file";
my @lines = split /(?:\015\012|\015|\012)/, $$content;
- or download this
$$content =~ s/(?:\015\012|\015|\012)/\n/g;