Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Reading entire file.

by bjelli (Pilgrim)
on May 04, 2001 at 12:13 UTC ( [id://77899]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      while (<FOO_FILE>){
           if  (/$foo/){
    ...
                 print $_;
           }
      }
    
  2. or download this
      while (<FOO_FILE>){ 
           last if /$foo/;
    ...
      close FOO_FILE;
      # just ignore the rest of the file
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-03-30 05:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found