> >I was just thinking that $((1,2,3)) is also the same as [1,2,3],
> >and shorter than scalar(1,2,3).
> >
> I wonder if you can't just use $(1, 2, 3) to the same effect.
I think you can. I was under the impression that the C comma was dying,
so that would have to make a list or err.
> Also, I
> wonder if you can do this:
> my @LoL = ( ("1a", "2a"),
> ("1b", "2b"),
> ("1c", "2c") );
>
Yeah, I think to get Perl5 behavioueaur :), you do this:
my @flatL = ( *("1a", "2a"), *("1b", "2b") );
Does this do the same thing?
my @flatL = *( ("1a", "2a"), ("1b", "2b") );
(Heh, I just got a fun thought:)
my $traversal_time = 2***@list;
> If you can, the only case where I could see [1, 2, 3] being necessary is
> in a sub call where the parameters are wrapped in parentheses.
Not even then, if $(1, 2, 3) is allowed. If so, it might be possible to
find another use for [...]. I like that syntax, but if we need a
balanced delimiter to do something else, that could be it...
Of course, the parallel [...] to @foo[...] goes nicely with
{...} to %foo{...}, so it will probably stay.
Luke