Tidy piping in perl

Hi,
I wrote a perl script like

--cut--
open( TIDY, "| tidy") || print "Couldn't open TIDY:$!";

print TIDY <<"_END_";
<HTML>
<BODY>
<P>some bad </h2>markup</I></HTML></BODY>
_END_

close(TIDY) || die print "couldn't close TIDY:$!";
--cut--

And i get the errormessage
"couldn't close TIDY:1 at tidy2.pl line 9."

Normally a script like this works fine, but with Tidy it doesn't.

Why? What's wrong with my script?

I'm using Active Perl 5.005_03 (win32) and Tidy (vers 14th April 1999)

TIA for help,

regards,
   Bjoern

Received on Saturday, 22 May 1999 10:04:43 UTC