Welcome to WebmasterWorld Guest from 54.159.90.0

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Perl and the Browser

open webpage downloaded using perl in browser

     
10:49 pm on Apr 22, 2007 (gmt 0)

New User

10+ Year Member

joined:Nov 15, 2006
posts:13
votes: 0


I am using the www::mechanize::shell module to automate some work on my sites. I am able to fill forms, get the pages, store them etc.
But sometimes I need to see the downloaded pages in browser immediately after they are downloaded (conditions for such display are known, so has to be made autoatic). The said module documentation recommends use of HTML::display module for such things.
The problem is i am working with active state perl on windows and the HTML::display module is not available for the platform (checked using ppm and searched activestate site).

Is there some other module that can help in displaying downloaded html pages in a browser (firefox preferably). I might have to strip content from several pages and view it as a single generated html page, is there a way to render html bits generated by my script (or www::mechanize functions) in a browser.
Thanks

2:32 am on Apr 23, 2007 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 5, 2006
posts:536
votes: 0


all you have to do is wrap the data in some html code:

print qq~Content-type: text/html\n\n
<head>
<body>
your data here
</body>
</html>
~;

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members