in reply to Are strings lists of characters?

Why split? Perl 5 can already do all that with an iterator that is context aware to boot.
$_ = join '', 'a' .. 'z'; print "$1\n" while /(.)/sg; print map "$_\n", /(.)/sg;
Did I miss anything?

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: Are strings lists of characters?
by petral (Curate) on Oct 18, 2002 at 21:06 UTC
      Did I miss anything?

    print map chr."\n", unpack "C*", $_;     ?   (TIMTOWTDI :-) )

    update:   and:     print chr for unpack "C*", $_

      p
      Now put that in a while loop condition.

      Makeshifts last the longest.