in reply to unicode? conversion

I may be missing something but man perlfunc tells me the binmode command only takes one argument, so what is ":raw" there for? Are you using a module which overrides the binmode function?

Also, why are you using binmode? If you want to view your file in ascii and set position in file binmode does not seem appropriate. The file will be the same on disk whether it is on dos or unix. I would only use binmode if trying to read a line without specifying byte length to read.

Also please check the usage of the read command in Perl. Otherwise the ord function does it in base 10, or see entries for hex and oct in the perl function manual. Here's mine.

open (IN,"$filename") || die "Can't open $filename. $!\n"; read (IN,$buf,$numbytes,$startbyte) || die "Read error. $!\n"; close (IN);