in reply to Re: Re: To die or not to die
in thread To die or not to die
you could always "warn" instead of die... except that you'd then be warning even on "expected" conditions. Earlier in this thread it was said that having no config file was a reasonable and expected condition.
If you have warnings disabled, you could do:
Warnings will have to be turned off because you'll be doing I/O on a closed filehandle. My other code posted earlier doesn't have that issue.open F, "config.txt" or $! !~ /no such file/i or die "config.txt error +: $!"; ... process F ...; close F;
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|