in reply to access to ERRORLEVEL on Win32

Maybe i missunderstand you, but
my $cmd = "echo %ERRORLEVEL%"; my $ret = system($cmd); return $ret;

Replies are listed 'Best First'.
Re^2: access to ERRORLEVEL on Win32
by gkraus (Novice) on Jun 29, 2009 at 13:13 UTC
    This won't help because it always return zero:
    c:> perl -e "exit 5" c:> echo %ERRORLEVEL% 5 c:>perl -e "print system('echo %ERRORLEVEL%');" 0 0 c:>