in reply to Re^2: Converting ASCII to Hex
in thread Converting ASCII to Hex

Was your test string "100" by chance? :) 31 = hex 1, 30 = hex 0. You're getting the right output, it just doesn't look like what you expected.

Here's an example you can try:
my $text = 'WHY HELLO THERE!'; # split into array of individual characters my @characters = split(//,$text); # transform each one individually into uppercase hex foreach my $char (@characters) { $char = uc(unpack "H*", $char); } # print in quotes to demonstrate separation between array elements print "@characters";
You can cross-check the results with http://www.lookuptables.com.