Help on HW #1, Question #3

Glen Mazza (mazza@cs.utk.edu)
Sat, 9 Sep 1995 21:28:17 -0400


This is about question #3 on homework assignment #1

It reads: Assuming valid HTML 2.0, write a Perl statement that will match
an anchor element in the current value of $_ and assign the value of
the HREF attribute to a variable named url.

Can I assume (as I can in prob #2) that the entire anchor element is on
one line? The first part of this problem is to search thru an HTML doc
for an anchor element, place it in $_, and then slice off the HREF attribute
into $url. This is fairly easy, if I can search by stripping off one
line of the HTML document and a time and checking if it contains an
anchor element.