C:\>perl -E "sub doit {for my $passed(@_) { say 'passed is: '. $passed;}} my @input = @ARGV; for my $input (@input) {say $input;} doit(@input);" "one two three" # NOTE QUOTING VARIANCE! one two three passed is: one two three C:\>