if (@ARGV) { print "called with "; foreach (@ARGV) { print "'$_' "; } print "\n"; } else { system ('perl', $0, "foo", "bar", "baz"); system ('perl', $0, "foo bar baz"); #single parameter system ("perl $0 foo bar baz"); system ("perl $0 'foo bar baz'"); } __OUTPUT___ $ perl temp.pl called with 'foo' 'bar' 'baz' called with 'foo bar baz' called with 'foo' 'bar' 'baz' called with 'foo bar baz'