##
- question-1
- Answer1
Back to top
- question-2
- Answer2
Back to top
####
use strict;
use warnings;
my $data = do {local $/; };
my $tag = 'ul';
my $count = () = $data =~ /<\Q$tag\E(?:\s.*?)?>/g;
print "Total number of $tag tags are: " . $count . "\n";
my @tags_to_insert = qq{
Back to top
};
my $insert=~s (<\Q$tag\E(?:\s.*?)?)(\@tags_to_insert\E)gs;
__DATA__
Data goes here...