Hi haukex,

I'm till getting the same error. Probably because I've added your suggestions in the wrong place.

use strict; use HTML::TreeBuilder 3; open(WRITE_FH, '>', $filename) or die "cannot open $filename"; select WRITE_FH; # ... # ... everything you print should be redirected to your file # ... my $root = HTML::TreeBuilder->new; $root->parse_file('file2.html'); my @div_class = $root->find_by_attribute("class","forminput"); foreach my $node (@div_class) { # print $node->content_list(); # print "\n"; } my $orig_fh = select(WRITE_FH); select($orig_fh); close WRITE_FH; #prnt elements in array: open( my $fh, '<', $filename ) or die "Can't open $filename: $!"; my @line = <$fh>; print "\n"; print "FillDB File Size Limit: $line[0]"; print "FillDB File Count Limit: $line[1]"; print "Timeout for queries in queue: $line[2]"; print "Size of queries in queue: $line[3]"; print "Size of results queue: $line[4]"; print "\n"; close $fh;

In reply to Re^2: print() on closed filehandle WRITE_FH by TonyNY
in thread print() on closed filehandle WRITE_FH by TonyNY

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.