In Perl, pack and unpack have two templates for converting bytes to/from hex:
hA hex string (low nybble first).
HA hex string (high nybble first).
This is best clarified with an example:
use 5.010; # so I can use say
my $buf = "\x12\x34\x56\x78";
say unpack('H*', $buf); # prints 12345678
say unpack('h*', $buf); # prints 21436587
As you can see, H is what people generally mean when they think about converting bytes to/from hexadecimal. So what's the purpose of h? Larry must have thought someone might use it, or he wouldn't have bothered to include it.
Can you give a real-world example where you'd actually want to use h instead of H with pack or unpack? I'm looking for a specific example; if you know of a machine that organized its bytes like that, what was it, and can you link to some documentation on it?
I can think of examples where you could use h, such as serializing some data when you don't really care what the format is, as long as you can read it back, but H would be just as useful for that. I'm looking for an example where h is more useful than H.