in reply to Equality of strings
Didn't you get a warning from this code?
$ perl -Mstrict -wE 'my $str = "[]"; say $str == "[]" ? 1 : 0' Argument "[]" isn't numeric in numeric eq (==) at -e line 1. Argument "[]" isn't numeric in numeric eq (==) at -e line 1. 1
$ perl -Mstrict -wE 'my $str = "42"; say $str == "[]" ? 1 : 0' Argument "[]" isn't numeric in numeric eq (==) at -e line 1. 0
You're not seriously still running your code without warnings enabled, are you? While simultaneously trying, based on your last few questions, to increase your test coverage numbers?!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Equality of strings
by wanna_code_perl (Friar) on Oct 22, 2019 at 00:54 UTC | |
by 1nickt (Canon) on Oct 22, 2019 at 02:06 UTC |