I'm working on something but I need to know how to write the dollar sign ($) character to the file.
e.g. open(FILEHANDLE,"file"); print FILEHANDLE qq~(the dollar sign here)blah~; close(FILEHANDLE);
claus
2:56 am on Sep 27, 2003 (gmt 0)
You can escape them using a backslash, like this (and do the same for at-signs):
\$ \@
Mr Anonymous
10:23 pm on Sep 27, 2003 (gmt 0)
Yep, that's what I was looking for. Thanks so much :) <><
amoore
10:32 pm on Sep 27, 2003 (gmt 0)
I notice that you're using the "qq" quote-like operator. That interprets variables, so you have to escape characters like "$" and "@". You can also use the "q" operator, so you can write things like: print q(cost: $34.00, email sales@example.com); and the spectial characters will not be interpreted. The perlop man page [perldoc.com...] has more information.