imagine that I have a document named finalgrades.html located at
http://somedomain.com/finalgrades.html and it contains the following text:
<html>
<head>
<title></title>
</head>
<body>
<b>Guy 1</b>, grade: 100<br>
<b>Guy 2</b>, grade: 70<br>
<b>Guy 3</b>, grade: 98<br>
</body>
</html>
I want a perl script ( to make a CGI ) which takes the values after "grade:" and before "<b>" for the line containing a name that I coose (for example "Guy 1"), and prints it to the screen when running it as a CGI on my webpage, something like this:
<html>
<head>
<title>CONGRATULATIONS TO THE PARTICIPANT Guy 1</title>
</head>
<body>
<h1>Guy 1</h1> Has just got a "100" as a
grade for this Seminar. Congratulations!!!<br>
</body>
</html>
edited: Sun Aug 3 15:19:23 2003
by jeffa - formatting, linkafied link
edited: Mon Mar 13 10:25:23 2006
by jamiel - formatting, spelling, etc...
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|