note
clueless newbie
<p>Depending on how you interpret "two different arrays" the following might be acceptable,</p>
<code>
#!/usr/bin/perl
use strict;
use warnings;
my $number;
# use grep to accept only the integers
push(@{$number->[$_ % 2]},$_)
for (grep { m{^-?\d+$} } @ARGV);
# Using $" to insert ", "
local $"=', ';
print "The even numbers are @{$number->[0]}\n";
print "while the odd numbers are @{$number->[1]}.\n";
</code>
<code>
> perl EvenOdd.pl 1 2 -nogo 3.4 3 4 5 -4
The even numbers are 2, 4, -4
while the odd numbers are 1, 3, 5.
</code>
999976
999976