1 2 3 4 5 6
#!/usr/bin/perl use strict; use warnings; local $/; my $hex = (@ARGV ? join("",@ARGV) : <STDIN>); print pack("C",hex($_)) for ($hex =~ m/../g);