in reply to Re^4: Read excel column and compare with arrayin thread Read excel column and compare with array
The return value of the s/// operator is the number of substitutions.
Use the following instead:
$variable =~ s/foo/bar/; say $variable; [download]