empty agreed, so it should be undef no?I think this is where you are taking a leap of faith, and leaping in the wrong direction. {grin}
In fact, Perl hints the contrary in perldoc perldata:
So there, you're not getting 1,2,3,undef. Just 1,2,3. An extra embedded syntax-only comma was formerly illegal (I believe). I'm a bit surprised to see that it's now being nicely ignored, just as the trailing comma had been, but it's not totally inconsistent with the trailing-comma-ignored feature.You may have an optional comma before the closing parenthesis of a list literal, so that you can say: @foo = ( 1, 2, 3, );
Conclusion: no bug, although not precisely documented to work with embedded comma as well as trailing comma.
-- Randal L. Schwartz, Perl hacker
In reply to Re: Re: Re: Bug with lists?
by merlyn
in thread Bug with lists?
by demerphq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |