in reply to Re: Generating characters (0 to 255)
in thread Generating characters (0 to 255)

Of course you are going to way too much effort to do this....

print "Decimal | Octal | Hex | Character\n"; print "--------+-------+-----+----------\n"; printf "%-8s| %03o | %02X |%3s\n",($_)x3,map{$_=/\n/?'^J':/\r/?'^M' +:$_}chr for 1..255;

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re^3: Generating characters (0 to 255)
by Aristotle (Chancellor) on Mar 30, 2003 at 21:27 UTC
    Capture regularities in code, irregularities in data.
    my %c = ( map(+(chr,sprintf '\x%02X',$_), 0 .. 31, 127 .. 160), "\a" => '\a', "\b" => '\b', "\e" => '\e', "\f" => '\f', "\n" => '\n', "\r" => '\r', "\t" => '\t', ); print "Decimal | Octal | Hex | Character\n"; print "--------+-------+-----+----------\n"; printf "%7d | %03o | %02X | %4s\n", ($_)x3, $c{+chr}||chr for 1..25 +5;

    Makeshifts last the longest.