Here's my script...
#!/usr/bin/perl -w
use DBI;
use CGI qw(param);
use CGI qw
standard);
use CGI::Carp qw(fatalsToBrowser);
use Fcntl ":flock";
my $cpnnbr = param("cpn_nbr"
;
my $coup = param("coupon"
;
if (length($cpnnbr) > 0){
script to get data from a file...
}
Problem is that even though $cpnnbr has data and it's length is greater than 0 (verified with tests), the 'if' statement is evaluating to false and the script inside the statement isn't being evaluated.
What am I not seeing?
There's always a better way...
#!/usr/bin/perl -w
use DBI;
use CGI qw(param);
use CGI qw
use CGI::Carp qw(fatalsToBrowser);
use Fcntl ":flock";
my $cpnnbr = param("cpn_nbr"
my $coup = param("coupon"
if (length($cpnnbr) > 0){
script to get data from a file...
}
Problem is that even though $cpnnbr has data and it's length is greater than 0 (verified with tests), the 'if' statement is evaluating to false and the script inside the statement isn't being evaluated.
What am I not seeing?
There's always a better way...