- or download this
johngg@abouriou:~$ perl -Mstrict -Mwarnings -E '
say for map { $_ % 2 != 0 } 0 .. 10;'
...
1
- or download this
johngg@abouriou:~$ perl -Mstrict -Mwarnings -E '
say for grep { $_ % 2 != 0 } 0 .. 10;'
...
5
7
9
- or download this
johngg@abouriou:~$ perl -Mstrict -Mwarnings -E '
say for grep { $_ % 2 } 0 .. 10;'
...
5
7
9