File::ReadBackwards, use integer

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm having trouble using File::ReadBackwards on large files.

The problem is that the line:
my $read_size = $seek_pos % $max_read_size || $max_read_size ;
yields -1 when $seek_pos is large.

I've "solved" the problem by commenting out the line:
#use integer;

But I'm sure that "use integer" wasn't put there just be ornery, so now I
wonder what awful thing is going to happen because I commented it out.

Any thoughts?



-------------------- http://NewsReader.Com / --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB

Re: File::ReadBackwards, use integer

Quoted text here. Click to load it

That "use integer" governs 220 lines of code.  That's not a whole lot,
but it would be hard to find all places where "integer" might make a
difference.  I'd ask Uri why it's there.

Even without looking at the code, "use integer" is likely to introduce a
2GB limit -- the documentation doesn't seem to mention such a thing.


Site Timeline