#!/usr/bin/perl -w use strict; local $/; open(INPUT, "input.html") || die("$!"); open(OUTPUT, ">output.html") || die ("$!"); my $txt = ; $txt=~s/<([^> ]*)([^>]*>)/"<".uc($1)."$2"/egsi; #Updated: only element names except attributes print OUTPUT $txt;