"Use of uninitialized value in string eq at ./elead.pl line 222. "... which is noted below.
I have checked the docs and some old postings, which is how I got the use of the length of the string to decide, but with warnings being used, I still get the message. ( and I do not want to turn warnings off)
TIA,
Chris
sub validate_sales_rep
{
my $sr = shift @_;
# find sales_rep
my $sth = $dbh->prepare("SELECT sri_person_id from lts.sales_rep_informa
tion where sri_sales_rep = ?");
$sth->bind_param(1,$sr);
$sth->execute();
my $sr_id = $sth->fetchrow_array();
# return the code for being valid or not
length($sr_id) ? return 0 : return 1; # this is new line 222
#return 1 if($sr_id eq ""); # these next two lines were my original checkings.
#return 0;
}
-- ------------------------------- Just Your Friendly Neighborhood _SPIDEY_
-----------------------------------------
The information contained in this message may be privileged, confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or any employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer.
Thank you. Paychex, Inc.