http://qs321.pair.com?node_id=189488


in reply to Returning from a program

Why not try exit($retval) where $retval has been set to the
value you wish to return as the error/success status

Hope this helps