my $s = 'redwhiteblue'; print $s, $/; while (/(.*)<\/blah>/) { # this RE isn't right... print $1, $/; }