Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Split words

by cheekuperl (Monk)
on Jul 11, 2012 at 15:41 UTC ( #981169=note: print w/replies, xml ) Need Help??


in reply to Re^2: Split words
in thread Split words

Nice observation!
However, for repeating "monks" all we need is this:
while($line=<DATA>) { while($line=~m/monks/g) { print "\n==>$`\nmonks\n$'"; } }
Now I've assumed prefix of "monks" means whatever precedes "monks" in the string (even if it contains previous "monks") Same goes for postfix.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://981169]
help
Chatterbox?
and monks are getting baked in the sun...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2017-10-22 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (272 votes). Check out past polls.

    Notices?