Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Equality of strings

by 1nickt (Canon)
on Oct 22, 2019 at 00:29 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11107800]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-20 13:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found