summaryrefslogtreecommitdiff
path: root/bin2hex (plain)
blob: a2b5183ca7e1493c953f67005380fbbea9efe936
1
2
3
4
5
6
7
8
9
#!/usr/bin/perl

use strict;
use warnings;

local $/;
my $bin = <STDIN>; #slurp
my @bytes = unpack "C*", $bin;
print for map sprintf("%2.2x",$_), @bytes;