in reply to Extract Last Command Line Within script
my $cmdline = "$0 @ARGV"; [download]
Note that $0 doesn't work on all platforms, and that shell interpolation is already done before the perl script starts, so you can't rely on this to be 100% accurate.