Help for this page

Select Code to Download


  1. or download this
    print do {use autodie; open my $fh, '<', 'test.txt'; local $/ = undef;
    + <$fh>};
    
  2. or download this
    use IO::File;
    
    ...
        print $fh->getlines;
    } # $fh->close is unnecessary.
    
  3. or download this
    use IO::File;
    
    print $_->getlines for IO::File->new('foo', 'r');