Help for this page

Select Code to Download


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