[Za-pm] returning values from a sub
Nick Cleaton
nick at cleaton.net
Mon Feb 9 04:49:28 CST 2004
On Mon, Feb 09, 2004 at 12:15:21PM +0200, Spike wrote:
>
> I have a sub (in module as it happens) that validates South African ID
> numbers and if the number is OK returns the DoB and sex.
> If not it populate an error string.
>
>
> I would like to use it like this:
>
> ($DoB, $sex) = said(1234567890123) || or die("$errstr");
You have an extra || there. Try:
($DoB, $sex) = said(1234567890123) or die("$errstr");
Nick
--
$_=')=***** http://www.exonetric.com/ Telehouse UK colo *****19Pi'.
'TDX\@PT**** GBP40/month +VAT 40G BW no setup fee ****}4KGXC'.
'~6K&2\6@**** ****(v';s/(.)
(.*(.).(.))/$2.($1^chr((ord($3)+ord$4)%128))/exsuntil s/Wo.*oo//s;;print
More information about the Za-pm
mailing list