in reply to Re^2: Getting stderr from a test::simple
in thread Getting stderr from a test::simple
Acceptable, probably, but if you merely want to print a warning in addition to making the test fail, I'd say do is your best choice:
open (FH, '>', '/tmp/x/logfile') or do { warn "Cannot open file [$!]"; return 1; };
There may well be more idiomatic ways of doing (no pun intended) this that I'm not aware of. My monastic brothers will (probably) be happy to chime in!
|
|---|