Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: creating a subroutine for accessing hash of arrays

by tilly (Archbishop)
on Mar 27, 2004 at 06:53 UTC ( [id://340225]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if (exists $partners{$item}) {
      my ($partners, $email, $nickname, $realname, $postcode, $phone) = @{
    +$partners{$item}};
      # Do something.
    }
    
  2. or download this
    if (exists $partners{$item}) {
      push @allmembers, $item,
        split / /, $partners{$item}{partners};
    }
    
  3. or download this
    sub do_for_partners {
      my ($item, $action) = @_;
    ...
      push @allmembers, shift;
      push @allmembers, (shift)->{partners};
    });
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-03-28 22:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found