$players{$1} = %skeleton_player;

You try to assign a hash to a scalar. A hash in scalar context will return a string that tells you something about the fill ratio of your hash. Try it out:

perl -e ' %h=(1,5,2,8); $d=%h; print $d;' #prints "2/8"

You want this instead:

%{$players{$1}} = %skeleton_player;

As you can see, now you are assigning a hash to a hash.

PS: It helps with debugging to print out values of variables even when you think you know what is in there. Very helpful for this is Data::Dumper. Try the following before and after your logging loop and see what your data looks like (you also have to add "use Data::Dumper" at the start of your script):

print Dumper(\%players),"\n";

Also very helpful to print out whatever gets matched in your logging loop, i.e. put this inside the match-success if-case:

print "I matched $1 and $2\n";

In reply to Re: Question regarding exact regexp matching by jethro
in thread Question regarding exact regexp matching by Ekimino

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.