in reply to Adding command line arguments.

how about:
foreach $number (@ARGV) { print "$number\n" unless ($number % 2); }