in reply to Re^2: getting the exact string used to call a perl script
in thread getting the exact string used to call a perl script

Be sure to just include the program name (optionally including the full path) as the first argument of exec/system, no redirection or anything else. Then you'll be doing the exact same as the shell. For example,

exec('ssh', @ARGV); #or exec('/usr/bin/ssh', @ARGV);