in reply to Re^5: referencing slices - love that DWIM
in thread referencing slices - love that DWIM

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

Replies are listed 'Best First'.
Re^7: referencing slices - love that DWIM
by ysth (Canon) on May 18, 2008 at 06:40 UTC