Your arguments will be separated by a space, so yes, fub1,fub2,fub3 will be one argument. Just use the space instead, and everything will be fine. For instance:.
flow.pl fub1 fub2 fub3 path1 path2 my $fub1 = shift;
or
my $fub1 = $ARGV[0];
All at once
my ($fub1,$fub2,$fub3,$path1,$path2) = @ARGV;
Note that using shift removes arguments from @ARGV .
If you have a list of arguments that may differ, this is a simple fix to put them last, then do:
flow.pl path1 path2 fub1 fub2 fub3 ... fubn my $path1 = shift; my $path2 = shift;
For more complex processing of arguments, use a module, for example Getopt :: Long .
source share