spaz has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (strings)
The following code produces some bizzare output.
Apparently, "a"++ = "b", and "z"++ = "aa". But if I ever try
to convert $string to a number "$number = (int $string)" I get 0.
Anybody know why?
--snip!--
--snip!--#!/usr/bin/perl my $string = "a"; for( $i = 0; $i < 64; $i++ ) { $string++; print "string = '$string'\n"; }
Originally posted as a Categorized Question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Why does $string++ work the way it does?⭐
by extremely (Priest) on Oct 26, 2000 at 11:54 UTC | |
by I0 (Priest) on Dec 26, 2000 at 05:23 UTC | |
Re: Why does $string++ work the way it does?⭐
by Fastolfe (Vicar) on Oct 26, 2000 at 05:51 UTC | |
Re: Why does $string++ work the way it does?⭐
by davido (Cardinal) on Sep 14, 2003 at 03:18 UTC | |
Re: Why does $string++ work the way it does?
by spaz (Pilgrim) on Oct 26, 2000 at 04:34 UTC |
Back to
Seekers of Perl Wisdom