Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Auto-increment and Auto-decrement

by John M. Dlugosz (Monsignor)
on Jul 04, 2001 at 07:28 UTC ( #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.


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?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2023-06-03 11:29 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (13 votes). Check out past polls.