in reply to character-by-character in a huge file

You can read your whole window at once by setting $/ to a reference to it's literal constant width.

{ open (FH, "<ciona_fasta_two") or die $!; local ($/, $_) = (\500); while (<FH>) { my ($first, $last) = (substr($_,0,1), substr($_,-1,1)); # do other stuff } close FH or die $!; }

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: character-by-character in a huge file
by bart (Canon) on Apr 09, 2004 at 11:29 UTC
    That's not a sliding window.

      It is with seek.

      After Compline,
      Zaxo