open(MYINPUTFILE, "){ $_ =~ s/(\s-)$/\$1<\/tag\>/g; $_ =~ s/(:)$/\$1<\/tag\>/g; print $_,""; }