in reply to Reading command line switches
On windows, you can use an API to retrieve the command line used to start the current process. You can get at this API through either Inline::C or Win32::API:
use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'END_C', NAME => 'junk', CLEAN_AFTER_BUILD => 0; SV *getCommandLine( ) { return newSVpv( GetCommandLine(), 0 ); } END_C print getCommandLine(); __END__ C:\test>getCmdLine.pl -x -P -Mfred /some=other "C:\Perl64\bin\perl.exe" "C:\test\getCmdLine.pl" -x -P -Mfred /some=o +ther
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading command line switches
by Just in (Sexton) on Mar 16, 2011 at 02:53 UTC |