[luau] Perl Frustration!!

Matt Darnell mdarnell at servpac.com
Sun Aug 17 13:04:01 PDT 2003


Aloha,

I am writing the following routine:

while (my $row_ref6 = $sth6 ->fetchrow_arrayref){
     if (@{$row_ref6} == '1') {
          print "Status is @{$row_ref6}\n";
     }
}


The database access works fine.  It produces the following output

Status is 0
Status is 1
Status is 0

I only want to know when the value is 1.  I have a feeling it evaluates to
true simply because it exists.

When I try to convert it to a scalar it changes the 0's to a 1.

I have subsituted 'eq' for '==' to no avail.

Anyone have any advice?

Aloha,
Matt




More information about the LUAU mailing list