#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    1
    Rep Power
    0
    I Need To Parse These HTML & Print It OUt to another File!

    <ul type=disc><li><font face="verdana,arial,geneva, helvetica" size=2 color="#000000"><a href="http://www.test.com" target="_top">TITLE</a></font> <font face="verdana,arial,geneva, helvetica" size=2 color="#000000">- Description</font>
    <br><font face="verdana,arial,geneva, helvetica" size=1 color="#000000">
    [ <a href="http://babelfish.altavista.com/cgi-bin/translate?urltext=http://www.Test.com&language=en" target="_top">Translate</A> ]
    [ <a href="http://www.test.com" target="_top">Recommend-It!</A> ]
    <!-- [ <a href="http://www.Test.com?URL=http://www.test.com/">Spider</a> ] -->
    <font color="#666666"><em>Added: 23-Feb-2000 Hits: 2</em></font> </font><br>

    </ul>


    I Need To Parse Our
    URL, Title, Description!

    I Don't know how to! Anyone Can Help?...

    I am a Beginner!

    Thanks
    Theepan
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    just print this values like following using print().

    #---test.pl--

    #!/usr/bin/perl

    print "Content-type: text/htmlnn";

    print"<html>n";

    print "<body>n";

    print "<ul type=disc><li><font
    face="verdana,arial,geneva, helvetica" size=2 color="#000000">n";

    print "<a href="http://www.test.com" target="_top">TITLE</a></font>n";

    print "<font face="verdana,arial,geneva, helvetica" size=2 color="#000000">n";

    print "- Description</font>n";

    print "<br><font face="verdana,arial,geneva, helvetica" size=1 color="#000000">n";

    print "[ <a href="http://babelfish.altavista.com/cgi-bin/translate?urltext=http://www.Test.com&language=en" target="_top">n";

    print "Translate</A> ]n";

    print "[ <a href="http://www.test.com" target="_top">Recommend-It!</A> ]n";

    print "<!-- [ <a href="http://www.Test.com?URL=http://www.test.com/">Spider</a> ] -->n";

    print "<font color="#666666"><em>Added: 23-Feb-2000 Hits: 2</em></font> </font><br>n";

    print "</ul></body>n";

    print "</html>n";


    #############----################

    or

    you can simply use
    print qq|

    <ul type=disc><li><font face="verdana,arial,geneva, helvetica" size=2 color="#000000"><a href="http://www.test.com" target="_top">TITLE</a></font> <font face="verdana,arial,geneva, helvetica" size=2 color="#000000">- Description</font>
    <br><font face="verdana,arial,geneva, helvetica" size=1 color="#000000">
    [ <a href="http://babelfish.altavista.com/cgi-bin/translate?urltext=http://www.Test.com&language=en" target="_top">Translate</A> ]
    [ <a href="http://www.test.com" target="_top">Recommend-It!</A> ]
    <!-- [ <a href="http://www.Test.com?URL=http://www.test.com/">Spider</a> ] -->
    <font color="#666666"><em>Added: 23-Feb-2000 Hits: 2</em></font> </font><br>
    </ul>
    |

    ##################-###############


    ------------------
    SR -
    shiju.dreamcenter.net

    "The fear of the LORD is the beginning of knowledge..."

    [This message has been edited by Shiju Rajan (edited May 20, 2000).]

IMN logo majestic logo threadwatch logo seochat tools logo