Help for this page

Select Code to Download


  1. or download this
    while ($data = <$fh>) {
       # do something with $data
    ...
    } else {
       # handle EOF
    }
    
  2. or download this
    while (1) {
       undef $!;   # doesn't really undefine $!
    ...
       }
       # do something with $data
    }
    
  3. or download this
    undef $!;
    while ($data = <$fh>) {
    ...
    if (defined $!) {
       # handle readline error
    }