in reply to Comparing the bytes of a file

I need to somehow get the byte values into an array, but I only know how to read strings

Strings are strings of bytes. It might help you to sometimes think of them as strings of characters (particularly when you are dealing with multibyte characters) but, when it comes right down to it, when you read a string you are reading bytes.

I hardcoded some of the elements as 'a'. Will this give me the ascii value for that caracter as I expect, or does it not work that way in perl? (I am more used to C++)

Yes. An 'a' is an 'a' is an 'a'. What you might be missing is that perl doesn't really have the notion of ints like C or C++. A number in perl is really a string. If you want to print the ascii value for 'a' in perl, printf("%d\n", 'a'); won't work like you expect. You'll want to use ord() or unpack() to do it. So, print ord('a'), "\n" would do what you want.

-sauoq
"My two cents aren't worth a dime.";