Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: question about $_ and eof

by wmono (Friar)
on Mar 13, 2002 at 08:05 UTC ( #151328=note: print w/replies, xml ) Need Help??

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";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://151328]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2023-12-05 18:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (27 votes). Check out past polls.

    Notices?