Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: Two simple code style advice questions

by choroba (Bishop)
on Jan 16, 2013 at 14:12 UTC ( #1013579=note: print w/replies, xml ) Need Help??


in reply to Re^2: Two simple code style advice questions
in thread Two simple code style advice questions

It probably means "Using '... x condition' is not always safe":
say $_ ? "true" : "false", "a" x $_ for 0, 1, "0e0";
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^4: Two simple code style advice questions
by Anonymous Monk on Jan 16, 2013 at 14:20 UTC
    Now what do you mean by that? What is it that you expect and how is it unsafe?

      The issue is that the code relies on true being represented by numeric one. While that works for numeric comparisons, it is not a safe assumption in general. So applying this construct to other kinds of tests could be dangerous.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013579]
help
Chatterbox?
[marto]: Corion, I can do some non-technical things, but there's no way for me to connect to the clients network.
[marto]: which is a shame, I had a really productive day yesterday
[Corion]: marto: Meh, so it'll be a day of cleaning out email...
[marto]: and hoped that I'd be able to continue the momentum :)
[marto]: I can't even access client email, nor my employers since those idiots moved to citrix
[marto]: it literally doesn't work. Also, via their citrix interface theres no way to open attachments, or upload an attachment for sending. The company policy is that you email you work account from a personal one, and forward it on from there :/

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2018-01-16 08:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (175 votes). Check out past polls.

    Notices?