It seems you've made two mistakes: o strings only returns printable strings from the file. It does not return the contents of the file made printable. So, any offset in the output will not be the offset in the file. You might want to investigate the -t option to strings.
o The -b option to grep returns the block offset, not a byte offset. Is there some reason you don't just read the file with Perl directly? - EAL > I want to replace a string "/usr/local" with another > string "/tmp/local" in a binary file. [ . . . ] > $s1 = `strings $file | grep -b /usr/local`; # returned 2027:/usr/local/conf/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]