Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Increment avoids warning unexpectedly

by ikegami (Patriarch)
on Jun 07, 2006 at 17:23 UTC ( [id://554098]=note: print w/replies, xml ) Need Help??


in reply to Re: Increment avoids warning unexpectedly
in thread Increment avoids warning unexpectedly

I see two holes in your argument.

1) That particular string is non-numeric and it does get converted to numeric. What would be the point of not issuing a "non-numeric isn't numeric" warning when it happens because the operator works with some other strings?

2) perl -wle "$s='abc'; $s--; print $s" doesn't give a warning either, yet non-numeric strings are never legal for the post-decrement operator.

I suspect the warning is surpressed as a side-effect (intentional or not) of supressing the undefined warning when executing my $i; $i++;.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-03-28 13:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found