Ok Thanks, that was very cunning, I just thought about that after reading your post.
I'm going through the links you sent.
Ive modified it to this, seems to work fine, please tell me if you have anything else to say about the code.
#!/usr/bin/perl
my $newstr = '';
open (FH, "test.txt") || die "Could not open file.\n";
while(<FH>)
{
$newstr = $newstr.$_;
print "!!\n" if ($newstr =~ /^-+\nPerl Progress\n-+\n\s\ndannyd\@c
+li>\s$/m);
}
close (FH);
Thanks a lot by the way, in my opinion this got solved super fast!! |