in reply to Re^4: Regex /g and interpolated lengths
in thread Regex /g and interpolated lengths

Off hand I'd say that you aren't accounting for the newlines in the data. You're trying to match across all six lines explicitly, but aren't matching the newlines. Try changing where you set content to look like this:

chomp(my @content = <FILE>);
And then there shouldn't be any newlines in $allseq

Oh, and if you're trying to match the same pattern several times, you can do something like this: /pattern{6}/ Though in your case that'll throw a kink into how you get the values out with $1 and friends.

Replies are listed 'Best First'.
Re^6: Regex /g and interpolated lengths
by KaiAllard (Initiate) on Nov 15, 2005 at 22:21 UTC
    s/^\w\w\t(.+)(?:\n)?/$1/ for(@content);
    Newlines should have been removed by that line.

      Ah, good point. Perhaps the file was generated on a DOS/Windows based system but he'se running his program on a unix-based or Macintosh system? The newlines would be different between those systems and his RE wouldn't be working properly.