nun wrote:
> ...
> 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";
> }
> ...
> BOO! AA,BB is EL-0001468271,EL-0001468271
>
> They sure look equal to me. Can anyone tell me what I'm not
> comprehending here ?
1) Try to reverse the output:
...
if($AA eq $BB){
print "YAY! BB,BB is $BB,$AA";
}
else {
print "BOO! BB,AA is $BB,$AA";
}
...
2) Find the "missing link"
(perldoc -f chomp)
3) retry the example with pattern matching,
eg.
if( $BB =~ /$AA/ ){
...
Regards
M.
|