A lot of modules will return a false value and set a package variable that contains the error for instance $DBI::errstr or alternatively a method that can be called to retrieve the actual error indicated by the false return value.
Alternatively "throw an exception" with die and "catch" the error with an eval block and retrieve the error message in $@
/J\
In reply to Re: Returning Error Codes
by gellyfish
in thread Returning Error Codes
by qazwart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |