Windows uses 64-bit integers for some things, such as time/date and file positions and other parameters to system calls. But ActiveState Perl is not compiled to support 64-bit ints and pack/unpack chokes on them.

Here is a snippet to unpack 16 hex digits into a binary buffer that is a proper int64 to pass to a Win32::API call.

# $val is up to 16 hex digits. $val = '0' . $val while length($val) < 16; my $int64= reverse pack ("H16", $val);