Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^5: hex numbers

by haukex (Bishop)
on Jan 14, 2021 at 19:04 UTC ( #11126925=note: print w/replies, xml ) Need Help??

in reply to Re^4: hex numbers
in thread hex numbers

Using string eval on a proper hex string constant can not be unsafe.

Of course not, but again, it is a matter of how likely it is the OP is doing that vs. the string coming from outside the program.

While warning aubout string eval composed of user input or some such is appropriate, it is not for this construct.

Your interpretation of "This works but is NOT recommended, and can be unsafe" is very different from mine, but I've already explained myself.

Warnings should be correct. Saying to a girl "if you kiss that boy you'll get pregnant!" is, albeit often turning out true in the long run, incorrect and misleading.

I don't agree with that comparison; I personally think stringy eval is dangerous enough to compare it to unprotected sex instead of kissing, in which case your post is the one that is misleading. But this moving into the area of opinions, which we could argue about all day. I did say that your clarification of the warning is a good thing, I just personally wouldn't have worded it as strongly as you did.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11126925]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2021-05-13 06:19 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (134 votes). Check out past polls.