- To: Mike.Lake@xxxxxxxxxx
- Subject: Re: [SLUG] Perl Q
- From: Russell Davies <russell.davies@xxxxxx>
- Date: Wed Jul 12 12:24:22 2000
- Cc: slug@xxxxxxxxxxx
; Simple Q,
;
; My perl script has a function and I want to return two
; arrays from the function. I found that I can't just assign
; the return values like this;
;
; (@A, @B) = readData();
;
; sub readData
; {
; # get data and create @A and @B
; return (@A, @B);
; }
Don't do that. In order to do what you want, you need to be using
array references.
return \(@a, @b);
man perlref.
r.