Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: (Quiz) To split, or not to split?

by chipmunk (Parson)
on Nov 05, 2001 at 08:12 UTC ( [id://123272]=note: print w/replies, xml ) Need Help??


in reply to (Quiz) To split, or not to split?

Tricky!

@chars = /./gs; grabs characters starting at pos(), and resets pos() afterwards.

For example:

#!perl $_ = "foo"; @chars1 = split //; @chars2 = /./gs; /f/g; @chars3 = /./gs; print "@chars1\n@chars2\n@chars3\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found