Thanks, it worked or at least gave me an error and exited the batch file. The batch
files are difficult to work out if there are a lot (I have 12 or more files to check)
so I will probably do as you suggest (write a wrapper) once I have worked out how to
do it, and then I can return the error
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 Per
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.
__SNIP__
while ()
{
chomp;
$length = length($_);
if ($length != $lp) {
print OU
You can use label and goto to achive this.
create a lable end of the batch file.
": FILE_ERROR
The check for the condition if it is false then use statement.
"GOTO FILE_ERROR".
This will send the cursor to last label. and will stop
you can instert a echo command also after this.
echo " Stopped