if ($^O=~/win/){ use Win32::API; my $GetCommandLine = Win32::API->new('kernel32', 'GetCommandLine', [ ] , 'P' ); $cmdline = $GetCommandLine->Call(); #Parse Command Line, into @ARGV if desired }