$ perl -Mstrict -wE 'my $str = "42"; say $str == "[]" ? 1 : 0' Argument "[]" isn't numeric in numeric eq (==) at -e line 1. 0