what is wrong with the subs

Posted by user352860 on Stack Overflow See other posts from Stack Overflow or by user352860
Published on 2010-06-02T12:27:13Z Indexed on 2010/06/02 12:33 UTC
Read the original article Hit count: 146

Filed under:
$a = "sad day
 Good day
 May be Bad Day 
 ";
$a=~s/\w+ \w+/_/gm;

print $a;

I am trying to subsitue with _ all spaces between words .

But its not working . What is wrong with that.

© Stack Overflow or respective owner

Related posts about perl