Help for this page

Select Code to Download


  1. or download this
    {
       local $_;
    ...
          ...
       } while defined $_;
    }
    
  2. or download this
    for (;;) { # Loop until "last".
       local $_ = <INHANDLE>;
       ...
       last if not defined $_;
    }
    
  3. or download this
    { # Loop while "redo".
       local $_ = <INHANDLE>;
       ...
       redo if defined $_;
    }
    
  4. or download this
    my $block = sub { ... };
    &$block while <INHANDLE>;
    &$block foreach undef;
    
  5. or download this
    for (;;) { # Loop until "last".
       local $_ = <DATA>;
    ...
    
       last unless defined $_;
    }
    
  6. or download this
    a
    b
    c
    [undef]