Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Large file processed line by line

by btrott (Parson)
on Jun 19, 2001 at 05:02 UTC ( #89533=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        open FH, "foo" or die "Can't open foo: $!";
        while (<FH>) {
            ## current line is in $_, process it
        }
        close FH or warn "Error closing foo: $!";
    
  2. or download this
        while (<>) {
            ## line is in $_
        }
    
  3. or download this
        $ process.pl foo.txt bar.txt baz.txt
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2023-02-02 12:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (17 votes). Check out past polls.

    Notices?