Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Substring comparison

by JavaFan (Canon)
on May 01, 2012 at 16:11 UTC ( #968292=note: print w/replies, xml ) Need Help??


in reply to Re: Substring comparison
in thread Substring comparison

Cleary 'FFF' is part of string 'FFF NNN JKK III LLL QQQ' and should return a result >= 0
Indeed, and it does. However, the negation of result >= 0 is not if($result <= 0), which is what you wrote in your program. There is a value (0) that's both >= 0 and <= 0.

Use if ($result == -1) in your program.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://968292]
help
Chatterbox?
[LanX]: understanding this code is like relearning space invaders and donkey Kong at the same time
[holli]: i saw that thread and figured it`s OPP value too high. i didnt realise its PM code
[LanX]: its the style attribute, I can't show you pm code, can only link to old everything docs of you want

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2017-11-20 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (294 votes). Check out past polls.

    Notices?