Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: My favorite looping mechanism in Perl is:

by jdporter (Paladin)
on Jun 25, 2012 at 00:35 UTC ( [id://978096]=note: print w/replies, xml ) Need Help??


in reply to Re^3: My favorite looping mechanism in Perl is:
in thread My favorite looping mechanism in Perl is:

oh, you mean like

for my $i ( grep { not $_ % ROWSIZE } 0 .. $#array )

Replies are listed 'Best First'.
Re^5: My favorite looping mechanism in Perl is:
by sauoq (Abbot) on Jun 25, 2012 at 21:29 UTC

    That would do ROWSIZE mods and ROWSIZE comparisons plus some other junk in place of a single addition.

    -sauoq
    "My two cents aren't worth a dime.";
Re^5: My favorite looping mechanism in Perl is:
by Anonymous Monk on Jun 25, 2012 at 13:54 UTC

    Yes. using foreach you have to do something terribly contorted and crazily inefficient. Like that.

    Thank you for so adeptly illustrating my point.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-18 04:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found