Cymen Vig

Software Craftsman

Shooting Yourself in the Foot with Perl

Returning Multiple Values

$error, $hash = function_a( ... );
if ( $error ) { error(); }    // never runs

Correction:

($error, $hash) = function_a( ... );
if ( $error ) { error(); }    // runs on error