From: John Dunn <[EMAIL PROTECTED]>
> 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.

If you do not handle the die() by an eval{} block like this:

        eval {
                ...
                open(MYFILE, ">$myfile") | die "Cannot open file";
                ...
        }
        if ($@) {
                print STDERR "There was an error: $@";
        }
        ... # let's continue

they are printed to the STDERR. Which unless you redirect it goes to 
the screen.

Are you sure your script actually executes? What exactly is the error 
message?

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


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

Reply via email to