in reply to Re: Re: Re: Re: "foreach" is to "next" as "map" is to ???
in thread "foreach" is to "next" as "map" is to ???

To help understand the empty list technique, look at this code, guess what it will output, and then try it.
my @a=((),(),()); printf "%d\n", scalar @a;
List flattening is the key. A little more directly:
printf "%d\n", scalar map {()} 1..3;

The PerlMonk tr/// Advocate