Help for this page

Select Code to Download


  1. or download this
           eof FILEHANDLE
           eof ()
    ...
                   "eof(FILEHANDLE)" on it) after end-of-file is
                   reached.  File types such as terminals may lose
                   the end-of-file condition if you do.
    
  2. or download this
                   Practical hint: you almost never need to use "eof"
                   in Perl, because the input operators typically
                   return "undef" when they run out of data, or if
                   there was an error.
    
  3. or download this
    while (<STDIN>) {
        print;
        print "***\n";
    }
    
  4. or download this
    while (<STDIN>) {
        print $_, "***\n";
    }