Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
How would I get a group of @codes to go through my .html file and if it finds anything in @codes, it'll change it into lowercase?
Basically, I'm trying to rewrite my html tags that are all uppercase to all lowercase.. How close am I?
Thanks.my $file = "index.html"; my @codes = ("<P>", "<BR>", "UL"); # and many more open(FILE, "> $file") or die "Oops: $!"; while(<FILE>); if ($_ eq @words) { $_ =~ s/@words/lc @word/g; } close(FILE);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: substuting a whole file
by ysth (Canon) on Jan 14, 2004 at 03:36 UTC | |
by sulfericacid (Deacon) on Jan 14, 2004 at 18:17 UTC | |
by ysth (Canon) on Jan 14, 2004 at 19:59 UTC | |
Re: substuting a whole file
by Roger (Parson) on Jan 14, 2004 at 03:21 UTC | |
Re: substuting a whole file
by jweed (Chaplain) on Jan 14, 2004 at 03:35 UTC | |
by Roger (Parson) on Jan 14, 2004 at 03:55 UTC | |
by jweed (Chaplain) on Jan 14, 2004 at 03:57 UTC |
Back to
Seekers of Perl Wisdom