[Za-pm] returning values from a sub

Tielman de Villiers tvilliers at lastminute.com
Mon Feb 9 04:29:33 CST 2004


On Mon, 2004-02-09 at 10:15, 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");
> 
> 
> My sub ends:
> 
> return @results;
## return @results
my ($dob,$sex) = @results;
return ($dob,$sex);
> 
> @results is being successfully populated with '1955-12-25'  'Male' in
> the sub
> 
> Any ideas?
> 
> 
> 
> 
> 
> 
> Spike Hodge
> 
> UNIX Programmer
> M-Web Technology
> 021 596 8496
> 083 294 9593
> Fax 0866721733
> 
> 
> Click here and make M-Web your homepage
> http://homepage.mweb.co.za
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________
> 
> 
> ______________________________________________________________________
> _______________________________________________
> Za-pm mailing list
> Za-pm at mail.pm.org
> http://mail.pm.org/mailman/listinfo/za-pm
-- 
Tielman de Villiers
Perl Developer: Post Sales
lastminute.com

Address: 4 Buckingham Gate, London SW1E 6JP
Tel: +44(0)20.7802.4393
Fax: +44(0)20.7802.9302
email: tvilliers at lastminute.com




More information about the Za-pm mailing list