Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Cant coerce

by hdb (Prior)
on Jun 24, 2014 at 18:52 UTC ( #1091091=note: print w/ replies, xml ) Need Help??

in reply to Cant coerce

The line

foreach my $rt ( @{$first{$fr}{$tg}{$ab}}){

tells that $first{$fr}{$tg}{$ab} is a reference to an array.

In the line

my $val = $first{$fr}{$tg}{$ab}{$rt} ;

you use it as if it were a reference to a hash. That's what the problem is.

If you remove that line and change the one after to

print " print $fr, $tg, $ab, $rt;"

you will probably get what you want. (I cannot test as you have not provided runnable code nor data.)

Comment on Re: Cant coerce
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1091091]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2015-01-27 03:30 GMT
Find Nodes?
    Voting Booth?

    My top resolution in 2015 is:

    Results (197 votes), past polls