http://www.perlmonks.org?node_id=310479


in reply to Re: Re: Re: open failure code
in thread open failure code

Of course the same could be done just with proper logical short circuit operators. Prefer the low-precedence ones for this sort of thing:

open FH, "<", $log and print "Success\n" or print "Failure\n";

That avoids trinaries and if/else's.


Dave


"If I had my life to live over again, I'd be a plumber." -- Albert Einstein