On Fri, 22 Nov 2002, Poster wrote:
> Hi, I am having a little trouble with a sub that is using the modulus
> operator.
>
> It is called here-within a while loop:
> while (my $row = $sth->fetchrow_hashref()) {
> count++;
> color_rows( $count )
> ------some other stuff
> <td bgcolor="$bgcolor">table cell value</td>
> -----some other stuff
> }
> --here is the sub
> sub color_rows
> {
> my $num = @_;
This statement assigns the number of elements in @_(no of arguments passed
into the sub) into $num. In your case $num will always contain 1.
This should be
my $num = $_[0];
or
my $num = shift;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]