Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://859021]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-26 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found