> open (PIPE, "|-", "convert -negate -modulate 200,0 -negate - 
> pbm:- | gocr -") or warn "$!\n";
> print PIPE $file;     #file is image content
> close PIPE;
> 
> prints to STDOUT everything I need (it is one line, lets say "This is
> test"). How I can grab this, so I have in
> $var = "This is test" ?
> 
> ofcourse
> $var = print PIPE $file; doesn't work and I don't expect it should.
> 
> I looked on IPC::Open2 and IPC::Run but these modules are over my
> knowledge. Could anyone help me on this point ?

Redirect to a file and read the file:

my $filename = '/tmp/output';
open (PIPE, "|-", "convert -negate -modulate 200,0 -negate - pbm:- |
gocr - > $filename 2>&1") or warn "$!\n";
open IN, $filename or die ......

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to