#!/usr/local/bin/perl use strict; use warnings; use YAML; use Data::Dumper; my $bin ="\x15\xED\xB0\x44\xB5\xEB\x2B\x05\x74\x1B\xD6\x5C\xBB\xE9 4F\x30\x"; say pack("H*, $bin); __DATA__ use this instead of STDIN like this.