in reply to Replacing special characters from a URL

Please, use <code>...</code> tags for better readability.

\W is non-word, so it's equivalent to [^\w] . Just add the dot there:

$str =~ s/[^\w.]|\d//g;

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Replacing special characters from a URL
by punitpawar (Sexton) on Feb 17, 2016 at 19:23 UTC
    Great !!! Thanks a lot !!!