@REM = ' @echo off c:\perl\perl %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl '; #!/usr/local/bin/perl # Converts HTML commands to lower case in HTML code, overwriting original file. # 05-Apr-1996 JPV 1.0 BUG = lower cased entire line if more than one HTML command $ver = "v1.1"; # 05-Apr-1996 JPV Fixed above, but BUG = fails if HTML command on more than one line #################################################################################### $Greeting = "$ver Copyright 1996 JP Vossen Licensed under the GNU GENERAL PUBLIC LICENSE. \tSee http://www.gnu.org/copyleft/gpl.html for full text and details.\n"; # Version and copyright info ($0 =~ s/^.*\\|\..*$//ig); # remove stuff up to the last "\" and after the "." if (("@ARGV" =~ /\?/) || (@ARGV < 1)) { #if wrong # of args, or a ? in args - die die ("\nUsage: $0 [infile] (Convert HTML commands to lower case)\n\n"); } open (INFILE, "$ARGV[0]") || die "$0: error opening $ARGV[0] for input.\n\n"; print ("\nConverting all HTML commands to lower case in $ARGV[0].\n\n"); @thefile = ; close (); open (OUTFILE, ">$ARGV[0]") || die "$0: error opening $ARGV[0] for output\n\n"; foreach $aline (@thefile) { $aline =~ s/(<.[^>]*>)/\L$1/g; print OUTFILE ($aline); } __END__ :endofperl