[sf-lug] Tutor me in Programming?
Justin Ryan
justizin at vongogo.org
Sun Sep 7 09:53:04 PDT 2008
2008/9/7 Jeff Bragg <jackofnotrades at gmail.com>:
>
>> You can add numbers, but you can only "concatenate" (append one string to
>> another) strings. There's also a whole art and science to manipulating
>> strings.
>
> Perl is somewhat of an exception to this rule. While it won't exactly let
> you add strings/characters as you would integers, it will allow you to
> increment them. For example, if you had a variable $v and incremented it as
> $v++, it would yield the next successive alphabetic element, so $v = 'a'
> would become 'b' , $v = 'n' would become 'o', $v = 'z' would become 'aa',
> and so forth, treating the string as much as possible like an integer
> (including incrementing the values starting from the left, which would be
> the least significant digit in a integer). So, $v = 'abc', if incremented,
> becomes 'abd', and so forth until when it reaches 'abz', incrementing again
> would yield 'aca'.
>
> I'll stop corrupting people with Perl black magicks now. You've given a
> succinct, easy-to-digest, abstract overview of the essentials of
> programming, IMO.
>
PHP also allows some crimes against comput-manity... ;)
--
Justin Alan Ryan
Independent Interaction Architect
http://www.bitmonk.net/
* : +1-415-226-1199 x2600
"All because of a bunch of stuff that happened.."
-Homer Simpson
"The best way to get in touch with me is PayPal.
-Alexander Limi
More information about the sf-lug
mailing list