Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Recursively walk a hash to get to an element

by ihb (Deacon)
on Mar 31, 2005 at 03:27 UTC ( #443669=note: print w/ replies, xml ) Need Help??


in reply to Re: Recursively walk a hash to get to an element
in thread Recursively walk a hash to get to an element

The reason of the error is that reduce uses a prototype not yet seen when the return statement is compiled. It's therefore interpreted as indirect object syntax (method { STATEMENTS } LIST), being do { STATEMENTS }->method(LIST) with direct syntax. The way to fix this is to call &reduce like List::Util::reduce(sub { ... }, LIST).

ihb

See perltoc if you don't know which perldoc to read!


Comment on Re^2: Recursively walk a hash to get to an element
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2015-07-06 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (84 votes), past polls