$line =~ s/gregarious/\\footnote\{gregarious\}/im; #### $line =~ s/gregarious/\\underline\{gregarious\}/;