use strict; open FILE, "; for (@line) { if ($_ =~ m{["](.*?)["]}) { print "$_\n"; } }