Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: remove spaces after join operation

by Loops (Hermit)
on Jul 26, 2013 at 11:37 UTC ( #1046492=note: print w/ replies, xml ) Need Help??


in reply to Re^2: remove spaces after join operation
in thread remove spaces after join operation

Ah, is your version of Perl too old to support the /r modifier? It wont work without it. I Suppose:

my $txt = join ' ',@first_sentence; $txt =~ s/\s*([.()])\s*/$1/g; print $txt;
Updated to simplify regex as suggested by hdb


Comment on Re^3: remove spaces after join operation
Download Code
Re^4: remove spaces after join operation
by lakssreedhar (Acolyte) on Jul 27, 2013 at 04:38 UTC

    ya its working now

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2014-07-13 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (249 votes), past polls