my ($result, $error) = function($arg); if ($error) { # do something... } #### ($result) = function($arg); # get the result only $result = function($arg); # WRONG!!! gets the error only