Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Match all Odd and Even Numbers

by bimleshsharma (Beadle)
on Oct 12, 2012 at 06:27 UTC ( #998609=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Match all Odd and Even Numbers
in thread Match all Odd and Even Numbers

Do you mind to use below code

my $num= [1 .. 100]; my (@even,@odd); map{0==$_%2 ? push(@odd,$_):push(@even,$_)} @$num; print "@even and @odd";


Comment on Re^3: Match all Odd and Even Numbers
Download Code
Re^4: Match all Odd and Even Numbers
by Anonymous Monk on Oct 12, 2012 at 06:30 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2014-04-21 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (492 votes), past polls