in reply to Adding command line arguments.

i'll stab at this.... mind you, i'm on a locked down terminal and can't test this...
foreach(@ARGV) { if (int($_/2) == ($_/2)) { print "$_\n"); } }
though, i could be totally wrong...

Also, look into the possibility that Perl has a "mod" operator.. i don't know offhand, but most other languages do.

it works like $remainder = mod($number, $divisor), wherein $remainder ends up with the leftover (remainder) from $number/$divisor.

so, if you had mod(6, 2) the remainder would be 0, but for mod(6, 4) the remainder would be 2

i'm not all that familiar with Perl, but there must be some similar functionality....

Update

argh! that's what i get for replying while i'm at work, and get called away.... in the hour between starting|finishing my post, lots of others have (better) answered...

anyhow, good luck!