in reply to Converting HTML tags into uppercase using Perl
Hi steve_g50, Try this,
#!/usr/bin/perl -w use strict; local $/; open(INPUT, "input.html") || die("$!"); open(OUTPUT, ">output.html") || die ("$!"); my $txt = <INPUT>; $txt=~s/<([^> ]*)([^>]*>)/"<".uc($1)."$2"/egsi; #Updated: only element + names except attributes print OUTPUT $txt;
Regards,
Velusamy R.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Converting HTML tags into uppercase using Perl
by Corion (Patriarch) on Nov 29, 2005 at 11:09 UTC | |
|
Re^2: Converting HTML tags into uppercase using Perl
by steve_g50 (Initiate) on Nov 29, 2005 at 13:16 UTC | |
|
Re^2: Converting HTML tags into uppercase using Perl
by steve_g50 (Initiate) on Nov 29, 2005 at 11:53 UTC | |
by davorg (Chancellor) on Nov 29, 2005 at 12:17 UTC |