"^A" is a *representation* of a *non-printable* character used by more and other programs. When you print the ^A character in Perl, it prints that character as you requested, not the two characters "^" and "A" like more does. If you want to print "^" and "A" like more does, feel free to format the output as you desire.
{
my %map = map { $_ => chr(0x40 + $_) } 0x00..0x1F;
my ($re) = map qr/[$_]/,
join '',
map quotemeta,
keys %map;
sub format_non_printables {
my ($text) = @_;
$text =~ s/($re)/$map{$1}/g;
return $text;
}
}
You could tie STDOUT to make this transparent.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.