How about this, instead?
sub error { warn map { "$_\n" } @_; return undef; } # # and later # open FH, ">$_[0]" or return error($!, "not able to write to file $_[0]");
In reply to Re: calling sub and returning value from the same line
by Anonymous Monk
in thread calling sub and returning value from the same line
by mellin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |