Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: open failure code

by mpeppler (Vicar)
on Nov 26, 2003 at 23:18 UTC ( [id://310410]=note: print w/replies, xml ) Need Help??


in reply to open failure code

You could do
open(FH, $log) || do { $down = 'true'; };
However that's really bad form, IMHO.

I might do something like this:

if(open(FH, $log)) { send tail of log file close(FH); } else { ... send server down... }
... and there are various other ways of coding this as well.

Michael

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://310410]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-16 17:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found