Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Why is "for" much slower than "while"?

by Anonymous Monk
on Jan 17, 2010 at 01:52 UTC ( #817807=note: print w/replies, xml ) Need Help??


in reply to Re: Why is "for" much slower than "while"?
in thread Why is "for" much slower than "while"?

Try
whyfor2 => sub { seek( $IN1, 0, 0 ); my %counts = (); ++$counts{$_} for ( ; defined( $_ = <$IN1> ) ; ) ; die unless keys %counts == @list; },

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://817807]
help
Chatterbox?
[Discipulus]: good advice ++marioroy

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2017-09-22 10:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (260 votes). Check out past polls.

    Notices?