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


in reply to open failure code

What all these wise monks forgot to tell you is how they arrived at the answer :)
perl -MO=Deparse,-p $down="false"; open (FH, $log) || $down = "true"; __END__ Can't modify logical or (||) in scalar assignment at - line 2, near "" +true";" - had compilation errors. ($down = 'false'); ((open(FH, $log) || $down) = 'true');
B::Deparse