while ($_ = getc STDIN) { $_ = ord $_; printf "%02x %c\n", $_, 32 <= $_ && $_ < 127 ? $_ : ord '?'; }