in reply to Removing duplicate line

I would have done it like that :

undef $/; # to absorb the whole file in a single read. open FILE, $filename; $all = <FILE>; $all =~ s/\.html/\.asp/g; # this will substitue the .html to .asp glob +ally # this takes the part in between the body tags... $all =~ s{^.*?\<body.*?\>(.*)\</body.*?\>.*?$} {$1}isx; print OUTFILE $all; close FILE;

He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

Chady | http://chady.net/