Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old May 19th, 2000, 08:45 PM
kadhalan kadhalan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 1 kadhalan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to kadhalan
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

Reply With Quote
  #2  
Old May 20th, 2000, 01:29 AM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 9
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan
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).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Can Someone Please Tell Me How to parse this html out


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway