Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by moritz (Cardinal)
on Jul 09, 2009 at 18:45 UTC ( #778656=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $t = 1;
    grep { $t^=1 } LIST
    
  2. or download this
    use 5.010;
    
    say grep { state $t = 1; $t ^= 1} <a b c d>;
    
    # prints: bd
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2023-09-23 07:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?