On 11 Sep 2000 13:47:22 -0400, Chaim Frenkel wrote:

>Sorry, I don't see list flattening as _fundemental_ to perl. It is
>just the way it is currently done. Could you tell me how it could be
>_fundemental_?

I'll give one example.

        sub min {
            my $min = shift;
            foreach (@_) {
                $min = $_ if $_ < $min;
            }
            return $min;
        }

        $a =  min(12, 45, 7);
        @b = (12, 45, 7);
        $b = min(@b);

Now, the possibility to either pass individual scalars to a sub, or an
array, (or several arrays, or a mixture of arrays and scalars) and Perl
treating them as equivalent, that is pretty much the most important
feature of Perl. IMO. Perl would not be Perl without it.

-- 
        Bart.

Reply via email to