in reply to Re: Dealing with errors in subroutines
in thread Dealing with errors in subroutines
But I don't remember why I thought it might be better. Certainly not from readability! What do others think of this kind of double-checking?for (@users) { my $success = eval { add_account($_); }; if($@ or not $success) { warn "Can't add user '$_': $@" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Dealing with errors in subroutines
by moritz (Cardinal) on Sep 14, 2009 at 10:48 UTC |