in reply to Re^3: printing array reference and storing this data in a hash.
in thread printing array reference and storing this data in a hash.

was wondering if you saw my most recent response? thx!
  • Comment on Re^4: printing array reference and storing this data in a hash.

Replies are listed 'Best First'.
Re^5: printing array reference and storing this data in a hash.
by shmem (Chancellor) on Dec 20, 2006 at 18:26 UTC
    For that type of questions, there's the messaging facility.

    Well, I was busy doing work (hrm. ;-) and reading other interesting posts. I also thought you would figure out, or somebody else would answer.

    ($name) = (split /:/, <FILE>) [0]; ($uid) = (split /:/, <FILE>) [2]; ($gid) = (split /:/, <FILE>) [3]; ($cmts) = (split /:/, <FILE>) [4];

    With that code, each split works on a new line read off the file handle FILE. The correct way would be:

    ($name, $uid, $gid, $cmts) = (split /:/, <FILE>)[0,2,3,4];

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}