I've gotten myself stumped with a perl coding problem that appeared to be 
a no brainer.  What is the easiest way to de-reference hashes(2 or more) 
returned from a function by reference?

The way I normally do this is as follows:

my ($hasref1, $hashref2) = function();

my %hash1 = %$hashref1;
my %hash2 = %$hashref2;

sub function {
..
.
..
.
return (\hash1, \hash2);
}

Essentially I'm wondering if anyone knows if it is possible to de-
reference these hashes on the line containing the function call.  I guess 
what this boils down to is if it is possible to treat a function as an 
array (knowing that it returns an array of information).  I know, for 
example, that the following doesn't work:  $element = function()[1];

Thank you.
 



-- 
Greg J. Zartman, P.E.
Vice-President

Logging Engineering International, Inc.
1243 West 7th Avenue
Eugene, Oregon 97402
541-683-8383    fax 541-683-8144


--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org

Reply via email to