if ( defined $cell ) { my $val = $cell->value; if ($val =~ /\s+$/ ) { $val =~ s/\s+//g; } if ( $val eq "$var") { return "$row $col"; } }