Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Writing processed html from Html::Parser

by Anonymous Monk
on Jan 14, 2011 at 03:31 UTC ( [id://882279]=note: print w/replies, xml ) Need Help??


in reply to Writing processed html from Html::Parser

with select
use autodie; { open my($out), '>', 'out.xml'; my $saver = select $out; my $parser = HTML::Parser.... print ... # all output goes into $out; select $saver; } print "all output goes back into STDOUT";
or with SelectSaver
use autodie; use SelectSaver; { open my($out), '>', 'out.xml'; my $saver = SelectSaver->new($out); my $parser = HTML::Parser.... print ... # all output goes into $out; } print "all output goes back into STDOUT";

Replies are listed 'Best First'.
Re^2: Writing processed html from Html::Parser
by nglenn (Beadle) on Jan 14, 2011 at 19:01 UTC
    Thanks! This works great.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://882279]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (1)
As of 2024-04-25 00:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found