in reply to Re: Re: Re: whats wrong with my sub-routine ??
in thread whats wrong with my sub-routine ??

Uhhh ... doesn't my $ar = @_; put the number of things, not the first thing, into $ar?

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Replies are listed 'Best First'.
Re: Re4: whats wrong with my sub-routine ??
by Ovid (Cardinal) on Apr 23, 2003 at 17:19 UTC

    Uhhh ... isn't that what I said? :)

    my $ar = @_;

    Now you're accessing an array in scalar context. This will result in $ar being set the the number of elements in @_.

    Cheers,
    Ovid

    New address of my CGI Course.
    Silence is Evil (feel free to copy and distribute widely - note copyright text)