develooper Front page | perl.beginners | Postings from May 2008

Compare String is not match !

From:
vu dinh chung
Date:
May 6, 2008 18:55
Subject:
Compare String is not match !
Hi all,
My code is below
*My code  runs;*
when run $array[$j][1] = 101-P-467593 ( this value is stored in excel 
file and this value input by hand ) and $accountNumber = 101-P-467593
*My code doens't run :*
when run $array[$j][1] = 101-P-467593 ( this  value  is stored in excel 
file and it is resulted  from query and export to Excel format )and 
$accountNumber = 101-P-467593 , We compare two values but The compare is 
not founded ?  --> if i change this value by hand , it is okie , 
comparation is successsful
I check in excel file for both case , the format is General .
I don't know why !
Advise me please !
Thanks

/
/*
/sub findEmailID {

    my $accountNumber = shift;

#    print "Finding Email Address for Account Number $accountNumber\n";


    my @array =  @$rowEntryArray;

    my $j = 1;

    while ( $j <= $#array) {

#     print "current account number is $array[$j][1]\n";

     if ( $array[$j][1] eq $accountNumber ) {

          return $array[$j][2];

      }

      $j++;

    }

 /*/
/



Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About