Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Possible to treat an HTML::TreeBuilder object as a filehandle? (perldoc -f open)

by Anonymous Monk
on Feb 11, 2014 at 09:16 UTC ( #1074370=note: print w/ replies, xml ) Need Help??


in reply to Possible to treat an HTML::TreeBuilder object as a filehandle?

perldoc -f open

$ perl -le " open my($fh), q{<}, \q{hi}; print readline $fh; " hi

open $handle, $mode, \$string;


Comment on Re: Possible to treat an HTML::TreeBuilder object as a filehandle? (perldoc -f open)
Download Code
Re^2: Possible to treat an HTML::TreeBuilder object as a filehandle? (perldoc -f open)
by jms53 (Monk) on Feb 11, 2014 at 09:42 UTC

    The filehandle doesn't kill the program my script anymore, however, I'm no closer to treating the HTML tree as a filehandle. I'm getting the following output:

    readline () on closed filehandle $fh at project12.pl on line 48. readline () on closed filehandle $fh at project12.pl on line 48. readline () on closed filehandle $fh at project12.pl on line 48. readline () on closed filehandle $fh at project12.pl on line 48.
    J -
      What program?
      $ perl -wle " open my($fh), q{<}, \q{hi}; print readline $fh; close +$fh; print readline $fh; " hi readline() on closed filehandle $fh at -e line 1.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (16)
As of 2015-07-03 12:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (52 votes), past polls