On 08/06/06, Dan Kogai <dankogai(_at_)dan(_dot_)co(_dot_)jp> wrote:
On the other hand, ranges in regexp and C<tr///> works. You may
consider this inconsistent but range operator must accept variables
like <tt>($start .. $end)</tt> while character ranges in regexp is
constant.
I don't find this particularly inconsistent. Ranges in tr/// and in []
are between characters, but the range operator operates on strings :
[rafael(_at_)localhost ~]$ perl -l
print for "zy" .. "aab"
__END__
zy
zz
aaa
aab
Sure, we can extend the magic to ensure that the increment of a
variable that holds "\N{omega}" is "\N{alpha}\N{alpha}". But I feel
that dragons might be dormant here...