Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Perlplexation - foreach shoulda Known

by chromatic (Archbishop)
on Apr 13, 2012 at 20:55 UTC ( #964990=note: print w/replies, xml ) Need Help??


in reply to Re: Perlplexation - foreach shoulda Known
in thread Perlplexation - foreach shoulda Known

As of Perl 5.12:

while (my ($i, $element) = each @array) { do_something( $element ) unless $i % 3; }

Improve your skills with Modern Perl: the free book.

Replies are listed 'Best First'.
Re^3: Perlplexation - foreach shoulda Known
by Riales (Hermit) on Apr 13, 2012 at 20:57 UTC

    Wow, cool! Thanks for pointing this out. I was always curious why something like this didn't exist--turns out it did all along!

      turns out it did all along!

      um... Only if the world began with Perl 5.12.

        Well, I only started with Perl recently, so from my perspective, it's always been there. :P

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://964990]
help
Chatterbox?
[Corion]: Yay. I've now published (at $work) that random Excel workbook where on one sheet you enter your SQL and on the other sheet, you have a button and receive the results. I'm so evil in enabling cow-orkers to self-supply ;)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2018-07-18 13:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (392 votes). Check out past polls.

    Notices?