Help for this page

Select Code to Download


  1. or download this
    sub first (&@) {
      my $code = shift;
    ...
    
      undef;
    }
    
  2. or download this
    open my $fh, '<', $filename or die "Cannot open '$filename' for readin
    +g: $!\n";
    tie my @arr, 'Tie::Array::Lazy', [], sub { scalar <$fh> };
    
    first { <whatever> } @arr;