Thanks for the heads-up on your solution.
BTW and FWIW, unpack with the H template specifier is more efficient than s///e in converting character strings to Intel hex. The only thing unpack doesn't offer (AFAIK) is control over the case of converted hex digits (lc by default), but this can easily be had with a supplemental uc call:
c:\@Work\Perl>perl -wMstrict -le
"my $dataToCheck = 'The Rain in Spain Falls';
;;
(my $h1 = $dataToCheck) =~ s/(.)/sprintf('%X',ord($1))/eg;
my $h2 = uc unpack 'H*', $dataToCheck;
;;
print qq{'$dataToCheck' -> '$h1'};
print qq{'$dataToCheck' -> '$h2'};
;;
die 'not the same' unless $h1 eq $h2;
"
'The Rain in Spain Falls' -> '546865205261696E20696E20537061696E204661
+6C6C73'
'The Rain in Spain Falls' -> '546865205261696E20696E20537061696E204661
+6C6C73'
See also pack (for all the template specifiers) and perlpacktut.
Give a man a fish: <%-{-{-{-<
|