Note that neither of these solutions will recreate options passed to perl rather than the script (such as -p, -C, etc.) Perl doesn't provide this information to the script.
But see Devel::PL_origargv.
In reply to Re^2: preserve quotes after $0 interpolation
by tobyink
in thread preserve quotes after $0 + @ARGV interpolation
by richard.sharpe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |