use String::ShellQuote qw( shell_quote ); my $cmd = shell_quote($0, @ARGV);