I don't know how to produce an accurate google statistic for the biggest beginner problem. You might also search for "arrays of arrays" (1490 results), or compare the stats for other common obstacles like "list context".

But I bet the non-reference character of @array will be the number one or at least on top three.

Almost every propaganda against perl I've seen so far lists this as a problem, and I haven't met any perl hacker til now, who didn't run into this trap.

I just wanted to propose extended sigils helping to destroy this argument without breaking compability like perl6 does.

And these sigils can be seen as a replacement of the PBP-rule to flag every reference variable with a trailing "_ref".

Which symbols to choose for these sigils is a matter of debate, since the characters less than 128 are already overloaded with syntactical meaning. Especially € is mapped on different positions.

UPDATE:

I know some people who decided only to use refs of arrays and hashes to avoid these problems. I tried this myself, but it's not that easy. e.g. you cant write push $arr_ref, expr;, slices with -> are not possible $arr_ref->[1..5] and nested structures need to be put in parens to get the listform:
for ( @{ $arr_ref->[idx1][idx2] } ) { ... }
compare this with
push €arr, expr; # (*) €arr[1..5]; for ( @€arr[idx1][idx2] ) { ... };
(*) prototype mechanism has to be extended for this.

In reply to Re^4: Two more Features Perl 5 Maybe Needs by LanX
in thread Five Features Perl 5 Needs Now by Arunbear

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.