in reply to Perl Zlib last block
$output =~ s/(.)/sprintf '%02x', ord $1/seg; # ^ [download]
You can also use
$output = unpack 'H*', $output; [download]
instead of the s/// with /e. It should be faster.