Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Are strings lists of characters?

by Aristotle (Chancellor)
on Oct 18, 2002 at 03:54 UTC ( [id://206211]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://206211]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-25 02:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found