Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Warning while using ternary operator

by BrowserUk (Pope)
on Dec 16, 2013 at 11:14 UTC ( #1067312=note: print w/replies, xml ) Need Help??


in reply to Re^2: Warning while using ternary operator
in thread Warning while using ternary operator

But my question is where does $i ne 'one' is happening in my code ? $i is assgined to 'one' and not getting changed.

The point is that the compiler knows at compile-time that 'nothing' is in a void context; so it warns you.

You can choose to ignore that warning; or you could even disable it; but it is surely better to simply correct the code.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^3: Warning while using ternary operator

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1067312]
help
Chatterbox?
[ambrus]: Corion: really? Does that mean the Prima watcher objects behave as handles that stop the watcher when they're destroyed, just like AnyEvent expects?
[ambrus]: "all the bugs" -- hehe, good luck
[ambrus]: Corion: what I don't understand is, if you make a one-shot AnyEvent timer with short timeout, does this code guarantee that the Prima timer can't queue two timeout events before invoking any of them?
[ambrus]: Because that could break AnyEvent code, which is why I added a guard.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2016-12-09 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (149 votes). Check out past polls.