in reply to Ignoring case

OK.. not much to do with your question since others have answered it, but as I suggested in your other post, you don't need to use 4 different variables to refrence the line you're working with. Here is your code, removing all the variables that you don't need.. oh and adding "use strict" and -w if you didn't have it already...
#!/usr/bin/perl -w use strict; my $filename = './index.html'; open (FILE, $filename); open OUTFILE, '>out.asp'; while(<FILE>){ # walk each file chomp; #grabbing and printing everything between the body tags if (/<body.*?>/i ... /<\/body.*?>/i){ # this is a body line # extract the body #changing .html to .asp in the links if (/href.*\.html/i) { s/\.html/\.asp/gi; } s/(.*?)\<body\>(.*?)\<\/body\>/$2/i; # Write the body to the output file print OUTFILE "$_\n"; } } close(FILE); close OUTFILE;
I think everyone would agree that only using one variable to manipulate one line of text makes things much clearer.

Rich