Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Replacing whitespaces with a regex

by ggoebel (Sexton)
on Mar 04, 2013 at 13:51 UTC ( #1021643=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $work =~ s/\s+$/ /; # more than once
    
  2. or download this
    $work =~ s/\s{2,}$/ /; # at least twice
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021643]
help
Chatterbox?
[Corion]: On the upside, maybe running that for my family would be interesting, or at least for myself
[Corion]: I'm not fond of using a server hosted by other people, even if they claim to be GNU ;)
[Discipulus]: gee a social network with the family.. is this a dread? ;=)
[Corion]: Discipulus: Nah, I'm thinking of posting more short stuff, but not all of it is fit for blogs.perl.org, more something a bit longer than Twitter but shorter than my usual b.p.o module posts
[Corion]: But Google+ is tedious and I'd like to keep my posts on an open platform instead, which can be followed via RSS

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-05-26 07:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?