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

Re: Cant coerce

by hdb (Parson)
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2014-08-28 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (259 votes), past polls