Home: Perl Programming Help: Beginner:
$$$$'s that just won't print.



AlanBell
Deleted

Jan 2, 2000, 9:11 PM


Views: 9821
$$$$'s that just won't print.

I made the mistake of adding this little problem on the end of the "or" question.
It was just asking to be ignored.

Here it is again.
When I try to print an expression that includes a "$" sign, it doesn't print. I tried substituting "&36;" but this didn't work either.

Thanks for the last reply. I like the idea of many ways to solve a problem.
Alan


Jasmine
Administrator / Moderator

Jan 3, 2000, 1:20 PM


Views: 9821
Re: $$$$'s that just won't print.

Alan:

It sounds like you're a victim of variable interpolation, which simply means that Perl thinks your use of the $ represents a variable, and not that you want to actually print the dollar sign.

Try placing a backslash before the dollar sign, like this:

\$22.00

If this doesn't do the trick, please post the code that you're using as well as the output.

-Jasmine


Borderline
Deleted

Jan 3, 2000, 5:11 PM


Views: 9821
Re: $$$$'s that just won't print.

Alan,

I am so sory I missed the last part of your post.

Scott


Jasmine
Administrator / Moderator

Jan 3, 2000, 10:50 PM


Views: 9821
Re: $$$$'s that just won't print.

Alan:

Glad it worked out. We're glad that the variable tutorial helped out, too.

Well, you know where the forum is now ... ask away!

- Jasmine


AlanBell
Deleted

Jan 4, 2000, 4:12 AM


Views: 9821
Re: $$$$'s that just won't print.

Jasmine,
Thanks. The "\$" worked fine.
I also checked out your tutorial on variables.
This is the level of information that I need.
The help files I have been reading assume that I already know the basic building blocks.
Hopefully, I can now live without your advice for a while. It has been much appreciated. My only regret is that I didn't find this forum earlier.
All good things,
Alan
PS Thanks to Scott also.