Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: storing and using LoL path

by almut (Canon)
on May 25, 2007 at 21:07 UTC ( [id://617609]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub lookup {
        my ($type, $ref) = @_;
    ...
            return $ref->[1]{key4};
        } # ...
    }
    
  2. or download this
    my @LoANY = (
        {
    ...
        
        # ...
    );
    
  3. or download this
    for my $elem (@LoANY) {
        print lookup($elem->{type}, $elem->{data}), "\n";
    }
    
  4. or download this
    Value1
    Value2
    Value3
    
  5. or download this
    my %map = (
        typeA => sub { $_[0]->{key1}[3]{key2} },
    ...
        typeC => sub { $_[0]->[1]{key4} },
        # ...
    );
    
  6. or download this
    for my $elem (@LoANY) {
        print $map{$elem->{type}}->($elem->{data}), "\n";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-18 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found