Shooting Yourself in the Foot with Perl
December 22, 2008
Returning Multiple Values
1
2
$error, $hash = function_a( ... );
if ( $error ) { error(); } // never runs
Correction:
1
2
($error, $hash) = function_a( ... );
if ( $error ) { error(); } // runs on error
Categories:
Programming
Tags:
Perl