## #grabbing and printing everything between the meta tags if it is on multiple lines if (//i ... /.*?>/i){ # this is a title line # extract the title $meta_temp = $_; $meta_temp =~ s/(.*?)\(.*?)\>/$2/i; chomp($meta_temp); $meta = "$meta_temp" ; # Write the meta to the output file print OUTFILE $meta . "\n"; }