Ben Aroia wrote:
>> PS: there's also String#unpack.
> That proved very useful. Thanks.
> 
> I meant that the hex string I was gunning for was, say 110 bytes into 
> the file, and I wanted everything between 110 and 200 to be read in in 
> hex. I meant I'd do something like
> f = File.open("name","r")
> for i in 0..109 do
> f.getc
> end
> 
> to bump the pointer forward 110 bytes.

It's more Rubyish to use internal iterators rather than external, for 
example 0.upto(109) or (0..109).each or 110.times or...

But use IO#pos= instead of a loop


Best regards,

Jari Williamsson