Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: While Loops

by tobyink (Abbot)
on Jan 10, 2013 at 13:25 UTC ( #1012660=note: print w/ replies, xml ) Need Help??


in reply to While Loops

Maybe something like this...

open my $fh, '<', 'myfile.log'; until (eof $fh) { my @hundred_lines = grep defined, map scalar <$fh>, 1..100; chomp @hundred_lines; ...; # do something with the lines }
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re: While Loops
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2014-07-11 23:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (236 votes), past polls