in reply to simple replace question

There are a number of regex's that would work here. The basic idea is to replace stuff that looks like <p> or <Xp>with nothing via a match global.
#!/usr/bin/perl -w use strict; my $test = '<p>this is some<1p> paragraph</p>'; $test =~ s/<.?p>//g; #s/<.??p>//g; #also ok print "$test\n"; __END__ prints: this is some paragraph