yep...it wasn't getting as far as the open

Thanks



-----Original Message-----
From: Gary Stainburn [mailto:[EMAIL PROTECTED]]
Sent: 14 January 2003 12:12
To: John Dunn; Beau E. Cox; [EMAIL PROTECTED]
Subject: Re: Where do die messages go?


Hi John,
On Tuesday 14 Jan 2003 12:08 pm, John Dunn wrote:
> Actually I do ( typo in email)
>
> open(MYFILE, ">$myfile") || die "Cannot open file";
>
> It still does not display my message

In that case, your problem is probably one of four:

1)STDERR is going somewhere else
2)die is being cought by an eval etc, as described by Jenda
3)The open's not failing so the die never gets cought
4)The codes never even being called

Try  putting the following code before the open statement.

print STDERR "this is a test print to STDERR\n";
die "testing die";

and see what's happening.

If you get nothing, then it's probably 1) or 4).
If you get the print but not the die, it's probably 2)
If you get both lines, it's probably 3)

Gary

>
> -----Original Message-----
> From: Beau E. Cox [mailto:[EMAIL PROTECTED]]
> Sent: 14 January 2003 11:59
> To: John Dunn; [EMAIL PROTECTED]
> Subject: RE: Where do die messages go?
>
>
> Hi -
>
> You need an or conditional ('||') not operator ('|'):
>
> open(MYFILE, ">$myfile") || die "Cannot open file";
>                          ^^
> Your message should appear! || you can use 'or'. :)
>
> Aloha => Beau;
>
> -----Original Message-----
> From: John Dunn [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 14, 2003 1:50 AM
> To: [EMAIL PROTECTED]
> Subject: Where do die messages go?
>
>
> open(MYFILE, ">$myfile") | die "Cannot open file";
>
> Where does the die message go? When I run my script from the command
prompt
> I do not see the die message.  I do get an error about the directory for
> the file not existing, but it is not my die message.
>
> This is on Win 2K
>
> John Dunn
> Sefas Innovation Ltd
> 0117 9154267
> www.sefas.com

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to