Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: how to avoid using index of array

by Plankton (Vicar)
on Nov 13, 2011 at 06:34 UTC ( #937799=note: print w/replies, xml ) Need Help??

in reply to how to avoid using index of array

plankton@chumbucket:~$ cat #!/usr/bin/perl -w use strict; my @boys = qw/boy boymonkey boydog/; my @girls = qw/girl girlmonkey girldog/; while (@boys){ # will be boys my $boy = pop( @boys ); my $girl = pop( @girls ); print "boy =[$boy] girl=[$girl]\n"; } plankton@chumbucket:~$ ./ boy =[boydog] girl=[girldog] boy =[boymonkey] girl=[girlmonkey] boy =[boy] girl=[girl]

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://937799]
[robby_dobby]: As in, it's-too-fancy- that-it-will-be- messy-to-handle
[choroba]: bit vectors as keys?
[robby_dobby]: Hmm, I keep falling asleep at my desk, while maintaining an active appearance. Am I getting old?
[robby_dobby]: Every time I fall asleep, there's a small guy in the dreams, shouting "Whoo!" and it jolts me awake. :/
[Lady_Aleena]: robby_dobby, at least you aren't driving. I seem to always be driving somewhere in my dreams and end up at a weird house.
[robby_dobby]: LA: That's there. But this is work and it's the same thing as falling asleep driving :-)
[Lady_Aleena]: I love the dream where I was at a huge house and decided to go swimming in the pool, but then the tour group showed up.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-05-29 08:06 GMT
Find Nodes?
    Voting Booth?