Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: First JAPH - Spell perl in two hundred and eighty five thousand and seventy four easy steps

by blakem (Monsignor)
on Jan 12, 2002 at 13:26 UTC ( [id://138247]=note: print w/replies, xml ) Need Help??


in reply to Re: First JAPH - Spell perl in two hundred and eighty five thousand and seventy four easy steps
in thread First JAPH - Spell perl in two hundred and eighty five thousand and seventy four easy steps

From perlop:

    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 /^[a-zA-Z]*[0-9]*$/, the increment is done as a string, preserving each character within its range, with carry:

      print ++($foo = '99'); # prints '100'
      print ++($foo = 'a0'); # prints 'a1'
      print ++($foo = 'Az'); # prints 'Ba'
      print ++($foo = 'zz'); # prints 'aaa'

    The auto-decrement operator is not magical.

-Blake

  • Comment on Re: Re: First JAPH - Spell perl in two hundred and eighty five thousand and seventy four easy steps

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://138247]
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 2025-05-21 01:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.