Re: hwk question
Shirley Browne (browne@cs.utk.edu)
Sun, 10 Sep 1995 14:20:09 -0400
>------- Forwarded Message
>
>Return-Path: <mazza@cs.utk.edu>
>Received: from duncan.cs.utk.edu by CS.UTK.EDU with ESMTP (cf v2.9s-UTK)
> id VAA25298; Sat, 9 Sep 1995 21:28:18 -0400
>From: Glen Mazza <mazza@cs.utk.edu>
>Received: by duncan.cs.utk.edu (cf v2.11c-UTK)
> id VAA13915; Sat, 9 Sep 1995 21:28:17 -0400
>Date: Sat, 9 Sep 1995 21:28:17 -0400
>Message-Id: <199509100128.VAA13915@duncan.cs.utk.edu>
>To: cs494@cs.utk.edu
>Subject: Help on HW #1, Question #3
>
>
>
>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.
>
>------- End of Forwarded Message
No, don't assume the entire anchor element is on one line. But you may assume
everything you need to look at is already in $_, which may include
newlines.
**************************************************************************
Shirley Browne Computer Science Dept. 107 Ayres Hall
browne@cs.utk.edu (615) 974-5886 University of Tennessee
Research Associate Fax (615) 974-8296 Knoxville, TN 37996-1301
Netlib Development Group
**************************************************************************