Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Answer: Why are these 2 strings equal?

by bikeNomad (Priest)
on Jun 09, 2001 at 02:17 UTC ( #87103=categorized answer: print w/replies, xml ) Need Help??

Q&A > strings > Why are these 2 strings equal? - Answer contributed by bikeNomad

Because when you use == the strings are converted to numbers. And both these strings equal 0 when converted to numbers. And 0 == 0.

Log In?

What's my password?
Create A New User
[sierpinski]: I've never seen $#$var before.
[LanX]: $list cops be an array ref
[LanX]: could
[LanX]: $#array gives the length
[LanX]: no sorry ...
[sierpinski]: so that would just be deferencing it...
[LanX]: the last index!
[LanX]: yes
[sierpinski]: yeah I guess $list is a reference.. yeah
[sierpinski]: why is it the last index and not the first? because the length of the array becomes the index?

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2017-12-13 16:00 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (369 votes). Check out past polls.