Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Squeezing $a+1 to be magical like $a++

by htoug (Deacon)
on Oct 10, 2001 at 12:40 UTC ( [id://117955]=note: print w/replies, xml ) Need Help??


in reply to Squeezing $a+1 to be magical like $a++

I just can't fathom why you want $a=$a+1 to work just like $a++. Why not just use the latter?

$a+1 is a very useful idiom to ensure that the value is numeric, while $a++ is magic.

Please explain what you want it for.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-18 20:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found