Here is a Perl code. Just copy it to your terminal (you need to have Perl installed, of course) and hit enter:
perl -e 'for (0..255) {$a[$_] = [$_, sprintf("%x", $_), chr($_)]; print $a[$_][0], " ", $a[$_][1], " ", $a[$_ ][2], "\n"};'
Or you can run this from the file:
for (0..255) {$a[$_] = [$_, sprintf("%x", $_), chr($_)]};
for (0..255) {print $a[$_][0], " ", $a[$_][1], " ", $a[$_ ][2], "\n"};
Or something more readable:
for $x (0..255) {
$a[$x] = [$x, sprintf("%x", $x), chr($x)];
}
for $x (0..255) {
print $a[$x][0], " ", $a[$x][1], " ", $a[$x][2], "\n";
}