Jun 19, 2001 #2 hmerrill Programmer Dec 4, 2000 473 US Escaping the dollar sign is just like escaping any other character - just put a backslash before it, like: print "\$var1 = $var1\n"; HTH. Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com Upvote 0 Downvote
Escaping the dollar sign is just like escaping any other character - just put a backslash before it, like: print "\$var1 = $var1\n"; HTH. Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com
Jun 19, 2001 Thread starter #3 Guest_imported New member Jan 1, 1970 0 Oh... because I'm making it like $1,000, and it now looks like \$1,000 and it still doesn't work. Do I have to escape the "," also? Upvote 0 Downvote
Oh... because I'm making it like $1,000, and it now looks like \$1,000 and it still doesn't work. Do I have to escape the "," also?
Jun 19, 2001 #4 sackyhack Programmer Nov 6, 2000 39 CA hmerrill's '\' escape works with a double-quoted string. You don't need to escape a '$' inside a single-quoted string. Code: print '$1,000'; print "\n"; print "\$1,000"; print "\n"; Upvote 0 Downvote
hmerrill's '\' escape works with a double-quoted string. You don't need to escape a '$' inside a single-quoted string. Code: print '$1,000'; print "\n"; print "\$1,000"; print "\n";