Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Equality of strings

by 1nickt (Abbot)
on Oct 22, 2019 at 00:29 UTC ( #11107800=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ 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
    
  2. or download this
    $ perl -Mstrict -wE 'my $str = "42"; say $str == "[]" ? 1 : 0'
    Argument "[]" isn't numeric in numeric eq (==) at -e line 1.
    0
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11107800]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2021-05-16 11:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (151 votes). Check out past polls.

    Notices?