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

Re^3: Mini-Tutorial: Working with Odd/Even Elements

by salva (Canon)
on Jul 09, 2009 at 19:14 UTC ( [id://778666]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Mini-Tutorial: Working with Odd/Even Elements
in thread Mini-Tutorial: Working with Odd/Even Elements

oops...
$ perl -de 1 ... DB<1> use 5.010; sub a { grep { state $t ^= 1 } @_ } DB<2> x a(1..5) 0 1 1 3 2 5 DB<3> x a(1..5) 0 2 1 4

Replies are listed 'Best First'.
Re^4: Mini-Tutorial: Working with Odd/Even Elements
by JavaFan (Canon) on Jul 09, 2009 at 19:33 UTC
    That's a feature! You first get the odd elements, then the evens! ;-) ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-20 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found