I'm a bet confused by your definition there. Do you need to remember the whole window of 500 characters? or just the first and last? Have you tried keeping an array and pushing single characters onto one end and then off the other? That seems to me to be the easiest way to keep track of a window of characters. I don't think that character by character comparisons on a huge file will ever be very fast. If you use an array though you can read by line and then split it. That way you can take advantage of perls file IO buffering.
In reply to Re: character-by-character in a huge file
by eric256
in thread character-by-character in a huge file
by mushnik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |