Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: how insert back slash to a string that has only special characters or mixture of both

by k_manimuthu (Monk)
on Sep 06, 2010 at 08:06 UTC ( #859021=note: print w/ replies, xml ) Need Help??


in reply to Re: how insert back slash to a string that has only special characters or mixture of both
in thread unable to differentiate last word and intermediate word in a sentence

The quotemeta function do this.

$var="!@#$%^&(),.}{[]+-"; print "\n$var"; $var_with_slash=quotemeta($var); print"\n$var_with_slash";


Comment on Re^2: how insert back slash to a string that has only special characters or mixture of both
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2014-09-01 19:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (17 votes), past polls