Help for this page

Select Code to Download


  1. or download this
        while (defined($_ = <FH>)) { ... }
    
  2. or download this
    my @lines = do { open my $fh, '<', $file or die "$file: $!\n"; <$fh> };
  3. or download this
    my @lines = do { local @ARGV = $file; <> };