in reply to Re^2: Build your array with push
in thread Build your array with push
You may have an optional comma before the closing parenthesis of a list literalIn fact, you can have extra commas anywhere you want in a list except (for reasons I can't explain) at the very front of it. They will not cause undef items to be created, nor will including nested empty lists.
my @items = ((),,,,5); print "<$_>\n" for @items; # prints only one item
|
|---|