#if the meta is only on one line if (/\/i) { # grab the meta tag lines print OUTFILE $_ . "\n"; }