Jun 19, 2001 #2 hmerrill Programmer Joined Dec 4, 2000 Messages 473 Location 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 Joined Jan 1, 1970 Messages 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 Joined Nov 6, 2000 Messages 39 Location 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";