First, if you want to use the term 'geezers', I recommend you don't use nonsense text speak like 'sez'. Us 'geezers' prefer real language :P

Next, on 5.10, your code apparently works for me, without knowing what you're expecting... it runs without error:

This is perl, v5.10.1 (*) built for x86_64-linux
$ perl x.pl THIRD: 0188 - 0000007777 - 40 THIRD: 0188 - 0000009980 - 41 THIRD: 0123 - 0000008888 - 50 THIRD: 0123 - 0000009999 - 51

Do you have code that doesn't work? What error do you get when you run it? Perhaps it's due to your example of [a, b, c]. Those are unquoted values you seem to be inserting into an array reference. That won't, and has never worked. Perhaps you meant [qw(a b c)] or [('a', 'b', 'c')], like this (still on 5.10):

use strict; use warnings; use Data::Dumper; my %h; my $itemArea = 1; my $itemID = 1; $h{$itemArea}{$itemID} = [qw(a b c)]; print Dumper \%h;

Output:

$VAR1 = { '1' => { '1' => [ 'a', 'b', 'c' ] } };

If the 5.24.x docs literally state: $something = [a,b,c], please let us know where, and I'll patch it.

Also, post your *exact* error, along with the *exact* code that triggers it.


In reply to Re: Perl 5.12.2 Data Structures by stevieb
in thread Perl 5.12.2 Data Structures by hennesse

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.