You can get the cents symbol (¢) in Perl with chr(162), as in:
#!/usr/bin/perl -w
use strict;
my $cents = chr(162);
print "$cents";
If you need the latin capital letter A with circumflex (Â), it's chr(194).
Main Topics
Browse All TopicsI'm at a total loss with this one.
This is an AWK scripting question. If someone can suggest a Perl solution, I'd take that one, too.
Of course I've already tried entering Alt-0162 and a variety of single quotings, double quotings, ticks, double-double quotings, double-single quotings, etc. But, there must be some simple way to do this that I just haven't tried or know about.
Here's the script I want to use to inform our customers about a 5¢ price increase (note the 5¢). It's important to use the cents symbol, so the perception is that the increase is VERY SMALL. 5¢ is just a "nickel", after all...
========== Script begins here ==========
BEGIN { "date" | getline d
split(d,darr," ")
dtstamp=sprintf("%s %s %s %s\n",darr[1],darr[2],darr
}
{
{ thismail = sprintf("echo \"%s\n\nDear %s,\n\nAfter six years of
stable prices, the cost of ink has increased to a point where we can
no longer absorb it. So, we will be increasing the cost of our
premium inks by 5[the cents symbol needs to go here] per pint,
effective May 1, 2007.\n\nWe realize that this may seem like a very
small increase, but over our many customers, and the many, many
gallons shipped, it should cover the increases without greatly
affecting your core business.\n\nThank you for your time.\n\nJerry
Gilels and\nThe TelePrint Operations Team\nCustomer Service Hours:
9am-9pm Mon-Sun (CST)\n\" | mail %s -s\"[Subject goes here]\"",dtstamp,
$5)
}
system(thismail)
}
========== Script ends here ==========
Also, how can I display the double quotes (") symbol and bold-ed text in the same e-mail? I can't get them to work either.
Thanks in advance for your help.
Jerry Gilels
Dallas, TX
214-526-9692
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I cannot use HTML. Not everyone has HTML turned on (me, for example).
So, I got my solution elsewhere.
After several (actually many) incorrrect answers, I contacted another developer (from another web site) and actually WORKED through the problem with him on the phone.
Eventually, someone did come up with PART of the solution (but, not the whole solution) here. And, it was too late.
The answer:
BEGIN { "date" | getline d
split(d,darr," ")
dtstamp=sprintf("%s %s %s %s\n",darr[1],darr[2],darr
}
{ thismail = sprintf("echo -e \"%s\n\n \242 \n\n...
}
}
system(thismail)
}
No one got the "echo -e", which is the only thing that makes the octal code work.
Zero Points.
Business Accounts
Answer for Membership
by: ozoPosted on 2007-03-31 at 11:14:23ID: 18829159
{ thismail = sprintf("echo \"%s\n\nDear %s,\n\nAfter six years of stable prices, the cost of ink has increased to a point where we can no longer absorb it. So, we will be increasing the cost of our premium inks by 5¢ per pint, effective May 1, 2007.\n\nWe realize that this may seem like a very small increase, but over our many customers, and the many, many gallons shipped, it should cover the increases without greatly affecting your core business.\n\nThank you for your time.\n\nJerry Gilels and\nThe TelePrint Operations Team\nCustomer Service Hours: 9am-9pm Mon-Sun (CST)\n\" | mail %s -s\"[Subject goes here]\"",dtstamp, $5, $5)
}