Trapping for Dollar Signs

J

jerry

Hello,

I'm writing a perl script that reads a database and produces
printable output.
I sluffed the "printing" part of things off to LaTeX. So the script
produces
TeX output. And TeX takes care of making things pretty.

TeX has certain characters that it does NOT like to see in the
plaintext.
# $ % & ~ _ ^ \ { } to be exact. But it will tolerate them if
they're escaped with \.

Some of these are pretty special to Perl too. Especially in regex's.

Things like $string =~ s/\$/\\\$/g; are just not working out.
Whatever I try,
I either get "$" in the output or "\\$", never just "\$". Wait, I
thought of
something - I'll just write a little C program to do it :).

- O Stop me before I C again .....

- Jerry Kaidor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top