Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: About text file parsing

by davido (Cardinal)
on Aug 29, 2018 at 18:45 UTC ( [id://1221322]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -e 'open my $outfh, ">", "sample.txt"; while ($i++ < 50_000_000) 
    +{print $outfh "abcdefghijklmnopqrstuvwxyz0123456789\n";}'
    
  2. or download this
    perl -E 'open my $infh, "<", "sample.txt"; while(<$infh>) {$i++} say $
    +i;'
    
  3. or download this
    my %dispatch = (
        sample =>  sub {my $capture = shift; # do something with $capture}
    +,
    ...
            $dispatch{$1}->($2);
        }
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-25 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found