in reply to getting the exact string used to call a perl script

What I think you are being confused by here is the difference between what Perl is dealing with and what your shell is dealing with. That is, if I understand what you are after correctly.

When you do an SSH to a remote box the shell is invoked first and any quotes that you have passed have already been digested in making up the ARGV to your script on the remote side. The relationship sorta loooks like this as a tree:

ssh -l user machine "the remote command" | | (assuming bash on the other side) | +--- bash | | +--- the | +--- ARGV[0] = remote [1] = command
or some such like that.

Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg