On Mon, Aug 1, 2011 at 4:03 PM, Yossi Itzkovich <[email protected]> wrote: > Hi again, > > > > Now it looks even weirder : > > > > my $retValType=$retVal->{'type'}; > > if ($retValType =~ m/^struct/) > > > > and I get the same error (Can't use string ("enum eAsonTrail") as a HASH ref > …) on the second line , and not on the first one ! >
Line numbers can be off for various reasons. I don't ask if you ran it through the debugger but have you tried printing $retVal before the assignment ? I guess - if this is a loop - you will see several lines like this: HASH(0x3242) and then on that contains. "enum eAsonTrail" That's a string and not a HASH ref, You will have to track down why do you have that sting in $retVal instead of a HASH ref? Gabor _______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
