Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: substr question

by ikegami (Pope)
on Jun 18, 2010 at 17:15 UTC ( #845416=note: print w/replies, xml ) Need Help??


in reply to Re: substr question
in thread substr question

That's the way I'd go too, but there's a little problem in your implementation:

$ perl -le'print "abc def" =~ m[(^.{0,100})\s]' abc
Fix:
m[(^.{0,100})(?!\S)]
m[(^.{0,100})(\s|$)]

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://845416]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2018-04-26 04:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?