my @test_text = $filetext =~ m/([\w\-._+]+\@[\w\-.]+)/gmx; if (scalar @test_text > 50) { #success! }