Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Recursively walk a hash to get to an element

by tlm (Prior)
on Mar 31, 2005 at 02:00 UTC ( #443660=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    { \($$a->{$b}) }
  2. or download this
    % perl
    Can't call method "List::Util::reduce" on unblessed reference at rec_w line 9.
  3. or download this
    use strict;
    my %myhash;
      require List::Util;
      return List::Util::reduce { \($$a->{$b}) } \shift, @_;
  4. or download this
    use List::Util 'reduce';
    sub pointer_to_element {
      return reduce { \($$a->{$b}) } \shift, @_;

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2015-08-03 21:50 GMT
Find Nodes?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...

    Results (56 votes), past polls