in reply to What's the meaning of die ref $res... ?

Look for the Ternary operator in the perlop doc.
ref $res ? $res->faultstring : $soap->transport->status
Could be written as
if (ref $res){ #$res is a reference and not a scalar die $res->faultstring; # exit printing the fault } else{ die $soap->transport->status; #Exit with the current transport statu +s of the SOAP object }
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."

Replies are listed 'Best First'.
Re^2: What's the meaning of die ref $res... ?
by miguelele (Beadle) on Jan 13, 2012 at 09:17 UTC
    Thank you, I get it now! It is no easy to make a search for "ref" or "?" or ":"
    Regards
      Indeed, until you know what it's called (at which point you probably understand it) searching for the ternary op can be difficult ;)
      print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."