I've never liked \(@foo)

Oh ... that now makes *3* of us that I know of.

I first came across this construct while building PGPLOT-2.18 on perl 5.8. One (or more) of the test files contained a line of code like (from test10.p):
pgline(128, \(0..127), $$img2D[127]);
The author (and I) were amazed to discover that what was intended to be the 2nd arg, was in fact 128 separate arguments. We were both convinced that this was a perl bug .... but were assured in no uncertain terms that it wasn't :-)

Update: As ysth says, it's not a bug and never was. (It has always been documented in perl 5.8.) But these were the early days of 5.8, neither Karl nor myself had studied the changes from 5.6. Why would we ? The behaviour was simply so counter-intuitive to us that it just *had* to be a bug :-)

Cheers,
Rob

In reply to Re^6: referencing slices - love that DWIM by syphilis
in thread referencing slices - love that DWIM by GrandFather

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.