develooper Front page | perl.beginners | Postings from December 2002

how to make die really dies on windows?

Thread Next
From:
Mrtlc
Date:
December 31, 2002 03:56
Subject:
how to make die really dies on windows?
Message ID:
20021231010517.38651.qmail@onion.perl.org
I have a script gonnadie.pl

##gonnadie.pl
do_sth
die "blah blah";


gonnadie.pl is called by a DOS batch file x.bat

REM - x.bat
perl gonnadie.pl


x.bat is called by y.bat

REM - y.bat
x.bat

When y.bat is run, the OS treats x.bat ends sucessfully, how can I make y.bat dies when gonnadie.pl dies?


I tried:

if %errorlevel% == 255 echo error
else goto a

:a


It didn't help.


I am sorry for posting a non-pure-perl question here.

Would you please help?

Thanks,

Stan L





Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About