use Win32::API; my $GetCommandLine = Win32::API->new('kernel32', 'GetCommandLine', [ ] , 'P' ); $cmdline = $GetCommandLine->Call();