Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Auto-increment and Auto-decrement

by John M. Dlugosz (Monsignor)
on Jul 04, 2001 at 07:28 UTC ( [id://93766]=note: print w/replies, xml ) Need Help??


in reply to Auto-increment and Auto-decrement

The perlop man page states,
The auto-increment operator has a little extra builtin magic to it. If you increment a variable that is numeric, or that has ever been used in a numeric context, you get a normal increment. If, however, the variable has been used in only string contexts since it was set, and has a value that is not the empty string and matches the pattern...
It doesn't say the decrement works the same way. Too bad; one would think so without reading the docs carefully.

—John

update: see Magical Auto-Decrement.

Replies are listed 'Best First'.
Re: Re: Auto-increment and Auto-decrement
by kiseok7 (Beadle) on Jul 04, 2001 at 11:52 UTC
    very thanks!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-12-09 04:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (53 votes). Check out past polls.