in reply to Unpacking binary data with unpack()?

Hi PiEquals3
You could take a leaf out of the XP book and proceed thus:
1- write a test subroutine that states your intent. In test below, I assumed that you want to convert the 8 bytes in $input into their hex-ascii representation, $wanted.
2- write some tentative conversion subroutines, like those below, and run the test on each.
3- if desperate (none pass), post your test script to perlmonks' and see if anyone can provide a solution that passes your test.
HTH
Rudif
#! perl -w use strict; sub same { shift; } sub unpacka { unpack "A*", shift; } sub unpackh { unpack "H*", shift; } sub unpackc { unpack "C*", shift; } sub test { my $code = shift; my $input = "HAL 2001"; my $wanted = "48414C2032303031"; my $testout = $code->($input); if ($testout =~ /^$wanted$/i) { print "pass\n"; } else { print "fail |$wanted|$testout|\n"; } } test \&same; test \&unpacka; test \&unpackh; test \&unpackc; __END__ fail |48414C2032303031|HAL 2001| fail |48414C2032303031|HAL 2001| pass fail |48414C2032303031|72|