Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1091091]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-06-26 10:49 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (577 votes). Check out past polls.