#!/usr/bin/perl -w $fn=<>; open(FH, "$fn") || die("Can't open:$!"); while() { if($_ =~ /\w\s+\w+\s+\w+\s+\w+\s+\w+/) { print "$_"; } } close FH;