[luau] Perl Frustration!!

Jaymes Schooler jimsch at ichgroup.com
Mon Aug 18 07:34:01 PDT 2003


unless I miss my guess, which is possible, its Monday...you need to finish
your if statement out with "fi" like this ...

     if (@{$row_ref6} == '1') {
          print "Status is @{$row_ref6}\n";
     }
     fi


-----Original Message-----
From: luau-admin at videl.ics.hawaii.edu
[mailto:luau-admin at videl.ics.hawaii.edu]On Behalf Of Matt Darnell
Sent: Sunday, August 17, 2003 1:08 PM
To: luau at videl.ics.hawaii.edu
Subject: [luau] Perl Frustration!!


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

_______________________________________________
LUAU mailing list
LUAU at videl.ics.hawaii.edu
http://videl.ics.hawaii.edu/mailman/listinfo/luau




More information about the LUAU mailing list