in reply to Re: open a pipe from system..
in thread open a pipe from system..

ehem?

I can run pdftohtml without using either system or exec?

It means that

open my $fh, 'pdftohtml x.pdf |' or die "Can't run pdftohtml: $!";
1st runs pdftohtml?
2nd creates a file handle (in var $fh)?
3rd I can read the output of pdftohtml from this $fh?

Thanks a lot, going to try it :-)

Carl

Replies are listed 'Best First'.
Re^3: open a pipe from system..
by Anonymous Monk on May 01, 2005 at 15:57 UTC
    thanks a lot!

    This works perfectly:

    open my $fh, "pdftohtml -noframes -stdout $pdf |" or die "Can't run +pdftohtml: $!"; while (<$fh>) { &func($_); } close($fh);
    option -stdout is needed (in case s.o.else is searching) to catch the output.

    have a nice Subday
    Carl