Steven Massey wrote:
> Hi all
>
> perl script below works, and does what I hoped it would, but I don't seem
> to understand how to get it to print out the result to a new file as
> opposed to stdout.
>
> Thanks for any help
>
> #!/usr/bin/perl -w
> use strict;
> use HTML::Parser;
>
> open(OUT, ">/share/file1") || die "Cannot open /share/file1: $!\n";
>
> my $html = HTML::Parser->new(
> api_version => 3,
> text_h => [sub{ print shift;}, 'dtext'],
> start_h => [sub{ print shift;}, 'text'],
> end_h => [sub{ print shift;}, 'text']);
tried sub {print OUT shift;) ? :)
> $html->ignore_tags(qw(!? table body span img p br hr td tr font i b h1
> a)); $html->parse_file("/share/input.txt");
> $html->eof;
>
> close(OUT);
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]