Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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?
[Discipulus]: good morning monks!
[choroba]: Good afternoon!
[GrandFather]: Good evening
[choroba]: Anyone from the East coast to say Good night?
[Discipulus]: still off place choroba?
[choroba]: till the end of the week

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2017-02-27 07:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (376 votes). Check out past polls.