Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Capture Lookahead

by inman (Curate)
on Jul 26, 2005 at 09:21 UTC ( #478101=note: print w/ replies, xml ) Need Help??


in reply to Capture Lookahead

Another regex solution.

#! /usr/bin/perl # use strict; use warnings; use re 'eval'; my $str = do {local $/; <DATA>}; $str =~ s/\s+//g; for (my $len = length $str; $len > 1; $len-- ) { $str =~ /(.{$len})(?{print "$1\n"})\b/; }


Comment on Re: Capture Lookahead
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2015-07-06 21:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (83 votes), past polls