Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: backward split

by athomason (Curate)
on Jun 01, 2003 at 01:04 UTC ( [id://262153]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $string = "foo.bar.foobar";
    my $count = 2;
    ...
    $count = 3;
    @splits = reverse map {scalar reverse} split(/\./,reverse($string),$co
    +unt);
    # --> @splits = qw/ foo.bar.foobar baz biff /
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-03-28 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found