Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

(to be deleted) Answer: How do I convert ( ' ) into something Prolog's name/2 can handle, e.g. ( \' )?

( #119322=categorized answer: print w/ replies, xml ) Need Help??

Q&A > strings > How do I convert ( ' ) into something Prolog's name/2 can handle, e.g. ( \' )? contributed by MrNobo1024

Just use a substitution regex:
$str =~ s|'|\\'|g;

  • Comment on (to be deleted) Answer: How do I convert ( ' ) into something Prolog's name/2 can handle, e.g. ( \' )?
  • Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2016-06-26 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (328 votes). Check out past polls.