in reply to Processing command line arguments

I expect Zaxo's answer above is what you need but as a relative beginner myself, I had to do a similar task and used an adaption of the named peramter way of passing into a sub routine.
My command line arguements look like this XPARAM=robert YPARAM=helen for example.Then
%params; foreach $arg (@ARGV){ ($key,$val)= split '=',$arg; $params{$key) = $val; }
I'm sure if you wonted to you could do something like XPARAM='1,2,3' and then split the hash values into an array.

A bit long winded I know but as a beginner possibly easy to understand.