in reply to Getting a script's original command line
Hi, found a relevant snippet on StackOverflow https://stackoverflow.com/questions/6156742/how-can-i-capture-the-complete-commandline-in-perl .
There's a lot of extra verbiage there, but the key part was something like this:
my $script_command = $0; foreach (@ARGV) { $script_command .= /\s/ ? " \'" . $_ . "\'" : " " . $_; }
It seems to do the job, at least for what I needed. Perhaps this will help someone else...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting a script's original command line -- Devel::PL_origargv
by Discipulus (Canon) on Sep 06, 2018 at 07:06 UTC | |
|
Re^2: Getting a script's original command line
by Your Mother (Archbishop) on Sep 06, 2018 at 04:34 UTC |