Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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.


Comment on Re^3: Split words
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2014-08-01 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (257 votes), past polls