Place the answer to problem 1 in a file named answers.txt. The answers to the other problems should be put in the files specified by the problem.
$line =~ s/<[^>]*>//g;Show a simpler way to write the search pattern.
<h1> An Introduction to Perl and Python 101 </h1>.with:
<center><h1> An Introduction to Perl and Python 101 </h1></center>.You do not have to worry about nested header tags. You should read the file name from the command line and write to stdout.
hint: You can use the following combination of modifier flags at the end of your search pattern to write a single pattern for performing the substitutions:
#perl2.html# perl23.html~ perlsystem.html~ perl1.html perlfile.html perlweb.html perl1.html~ perlfile.html~ perlweb.html~ perl2.html perlsys.html references.html perl23.html perlsys.html~ references.html~After running backup.perl on this directory, it should produce the following ls listing:
backup perl1.html perl23.html perlsys.html references.html #perl2.html# perl2.html perlfile.html perlweb.htmland backup should produce the listing:
perl1.html~ perlsys.html~ references.html~ perl23.html~ perlsystem.html~ perlfile.html~ perlweb.html~