Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Numification of strings

by ikegami (Pope)
on Aug 02, 2010 at 03:36 UTC ( #852393=note: print w/replies, xml ) Need Help??

in reply to Numification of strings

When you ask for the numeric value of something that isn't a number, it does the best it can and gives a warning.

Replies are listed 'Best First'.
Re^2: Numification of strings
by LanX (Chancellor) on Aug 02, 2010 at 11:43 UTC
    ... and gives a warning.

    ah, thank you!

    I missed there are warnings while testing in the debugger¹!

    However this gives me the possibility to change $SIG{__WARN__} to deal with this kind of errors...e.g. by dieing.

    Cheers Rolf

    1)... hmm but why?


    OK starting the debugger with -w switch helps.

    :~$ perl -w -de0 ... DB<1> $x="6gg" DB<2> p -$x Argument "6gg" isn't numeric in negation (-) at (eval 6)[/usr/share/pe +rl/5.10/] line 2. ...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://852393]
LanX starts googling the punch line ...
[choroba]: suddenly, a weird noise can be heard, and the conductor stops them
[choroba]: (sorry, was interrupted by a call)
[choroba]: What was that? asks he
[choroba]: and the triangle player says, "That was me. It's written here in the score"
[choroba]: and shows a bar with a note "ohne Triangel"
[choroba]: where "ohne" means "will bend" in Czech
[LanX]: one-day-the- triangle-player-of -an-orchestra-gets -very-sick xD

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2017-03-27 11:57 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (319 votes). Check out past polls.