sub return_scalars {
$scal1 = 5; Assign values to scalars somehow
$scal2 = 7;
return \$scal1, \$scal2;
}
($test_scalar1, $test_scalar2) = &return_scalars();
-----Original Message-----
From: Roy Peters [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 31, 2001 7:44 AM
To: [EMAIL PROTECTED]
Subject: returning more than 1 scalar from a subroutine
hi,
Is there any way to return 2 or 3 scalar variables from a subroutine (like
passing a variable by reference in C)?
I would like to avoid returning an array, if possible, because it makes
the script very non-intuitive.
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]