[Chicago-talk] return values

Jonathan Steinert hachi at kuiki.net
Tue Dec 30 14:02:07 CST 2003


Dooley, Michael wrote:

> if you have multiple return values do you have to use an array to collect
> them? or can you get each return value in is own variable off the jump?
> 
> sub stuff {
> $a=1;
> $b=2;
> return ($a, $b);
> }
> 
> @c=stuff
> 
> so
> $c=1st return value
> $d=2nd return value
> 
> 

do you mean calling it as:

($c, $d) = stuff();

?

--Jonathan




More information about the Chicago-talk mailing list