On Mon, 1 Oct 2001 [EMAIL PROTECTED] wrote: > I think my main problem is getting an eror out of perl which is > recognised by a .bat file. I have set a return code in the program > from a subroutine but it is not getting to the operating system.
You should use 'exit' to return a value from a Perl program back to the OS. 0 means a normal exit, 1 means an error condition. In a typical batch file, you can do something like 'IF ERRORLEVEL = 1 GOTO ERRORHANDLER'. DOS Batch files don't do very well handling error conditions. I would recommend writing a wrapper script in Perl instead to run your secondary Perl programs, or move to an environment that has better scripting tools. On Windows, CygWin or MKSTools offer most of the advantages of Unix scripting tools, like bash or ksh. -- Brett http://www.chapelperilous.net/ ------------------------------------------------------------------------ "Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]