#!/usr/bin/perl -w
use strict;
my $input = qq(
After first style
After second style
);
print $input, "\n-------------\n";
$input =~ s!<(s(?:cript|tyle))[^>]*>(?:.*?\1>)?!!gis;
print $input, "\n";
__END__
# output #
After first style
After second style
-------------
After first style
After second style