On Wed, 20 Jun 2001, Nick Transier wrote:

> You are saying I cannot set the size of an array? I understand that you do
> not have to, but I need to in this case so that my iteration loops work
> correctly.

No you don't:

foreach $i (0..@array) {

        print "$array[$i]\n";
}

@array used in a scalar context gives you the size of the array, or you
can explicitly put it into a scalar context using the scalar function.

-- Brett
                                   http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
Drunks are rarely amusing unless they know some good songs and lose a
lot a poker.
                -- Karyl Roosevelt

Reply via email to