N
nun
I have the following hunk of perl:
###############################
# load image names into array
my $image_names_file="image_list.txt";
open(DAT, $image_names_file) || die("Could not open file!");
my @image_names=<DAT>;
close(DAT);
for my $this_image_name (@image_names) {
my $AA = $SKU;
my $BB = $this_image_name;
if($AA eq $BB){
print "YAY! AA,BB is $AA,$BB";
}
else {
print "BOO! AA,BB is $AA,$BB";
}
}
#################################################
The $SKU variable is defined elsewhere in the script. The script runs,
but the if($AA eq $BB) seems never to be true.... the relevant line out
output is puzzling to me:
BOO! AA,BB is EL-0001468271,EL-0001468271
They sure look equal to me. Can anyone tell me what I'm not
comprehending here ?
DB
###############################
# load image names into array
my $image_names_file="image_list.txt";
open(DAT, $image_names_file) || die("Could not open file!");
my @image_names=<DAT>;
close(DAT);
for my $this_image_name (@image_names) {
my $AA = $SKU;
my $BB = $this_image_name;
if($AA eq $BB){
print "YAY! AA,BB is $AA,$BB";
}
else {
print "BOO! AA,BB is $AA,$BB";
}
}
#################################################
The $SKU variable is defined elsewhere in the script. The script runs,
but the if($AA eq $BB) seems never to be true.... the relevant line out
output is puzzling to me:
BOO! AA,BB is EL-0001468271,EL-0001468271
They sure look equal to me. Can anyone tell me what I'm not
comprehending here ?
DB