Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 studying the Monastery: (19)
As of 2014-12-19 18:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (91 votes), past polls