#!/usr/bin/perl use strict; use warnings; my @c = (1 .. 10000000); my @d; foreach my $dd (@c) { push(@d, $dd % 2); } my @e; foreach my $ee (@d) { if (!$ee) { push(@e, $ee); } } exit(0); #### #!/usr/bin/perl use strict; use warnings; my @c = (1 .. 10000000); my @d = map( $_%2, @c); my @e = grep(/0/, @d); exit(0);