Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 musing on the Monastery: (1)
As of 2018-07-21 16:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (449 votes). Check out past polls.

    Notices?