in reply to Re^4: @array[1] is valid??
in thread @array[1] is valid??
You couldn't image any way where using a single element list would be useful, and given an example, you can't image you ever using it. Does that carry any weight? Or does that just mean your imagination is limited?
The fact that you would use different code isn't something I care about. More ways of doing something in Perl is a feature of Perl. I already pointed out there are different ways of doing the same. (Not that your code does the same, it stores the results in a scalar, while my code stores it in an array). But that doesn't mean other ways should be warned against - we do like people to use warnings, but too many warnings just means people will turn them off.
Now, to repeat my unanswered question, do you have an example (and it better be a good one, or someone will dismiss it as 'contrived'), where using @array[0] in a non-lvalue context could cause a result different from using $array[0]?
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: @array[1] is valid??
by Aristotle (Chancellor) on Aug 05, 2003 at 16:47 UTC | |
by Abigail-II (Bishop) on Aug 05, 2003 at 21:18 UTC |