Hello tamaguchi
First of all, welcome to the monastery! We will try to help you with most of your Perl related questions (and some non-Perl related questions too). For getting a quick grip on references, I suggest tyes References Quick Reference.

I saw that you changed your title from "Hello All" to "hash of arrays to a subrutine?" - this is very good. The choice of a good title helps the readers to quickly understand your question and also helps you, the author, to take a step back and reflect on what your question actually is.

Update: I completely forgot to add a simplicistic example of how to pass a hash of arrays to a subroutine:

my %players = ( frodo => [ 'ring', 'chainmail armour' ], sam => [ 'lembas', 'chainmail armour' ], smeagol => [ 'fish', 'rabbit' ], ); # Pass the hash as a list: sub print_players { my (%players) = @_; for my $player (keys %players) { printf "$player: %s\n", join ",",@{$players{$player}}; }; }; # Pass the hash as a reference: sub print_players_ref { my ($players) = @_; for my $player (keys %$players) { printf "$player: %s\n", join ",",@{$players->{$player}}; }; }; print_players(%players); print_players_ref(\%players);

In reply to Re: hash of arrays to a subrutine? by Corion
in thread hash of arrays to a subrutine? by tamaguchi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.