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";
In reply to Re^3: Match all Odd and Even Numbers
by bimleshsharma
in thread Match all Odd and Even Numbers
by Dru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |