How do I get a hash back from a class method call?
Without a class involved (works):
sub hashit { my %hash = ("a", "1", "b", "2"); return \%hash; }
my $hash_ref = &hashit();
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
With class (doesn't work):
sub hashit { # in class def
my %hash = ("a", "1", "b", "2");
return \%hash;
}
$obj = Class1->new(); $obj = &Class1->hashit(); # doesn't work
Thanks! Steve
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>