Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: open failure code

by mpeppler (Vicar)
on Nov 26, 2003 at 23:18 UTC ( #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
Node Status?
node history
Node Type: note [id://310410]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2021-04-12 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?