[EMAIL PROTECTED] (Zentara) writes:
> I get it, so "perl" equals 285075 in a base24 number
> system, with the alphabet as it's units.
24? What's 24? There are _26_ letters in the alphabet! Or
was "24" a base _11_ number? And if so, what extra digit
were you using other than your fingers? :-)
> For the sake of theoretical babbling, could this base24
> number system be used to perform math operations in perl?
> Carry it to decimal points etc. Like perl.sdc ?
For the sake of theoretical responses, here's the
"Programming Perl" explanation:
=> The autoincrement operator has a little extra built-in 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 only been used in
=> string contexts since it was set, and has a value that is
=> not null 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 autodecrement operator, however, is not magical.
I guess by "within its range" implies 3 (not 2) ranges:
[a-z]
[A-Z]
[0-9]
--
Michael R. Wolf
All mammals learn by playing!
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]