in reply to Re: need help with open2, please!
in thread need help with open2, please!
From a debugger, I see that it hangs at the line:sub _init { ... $Lingua::Ispell::pid = open2( *Reader, *Writer, $Lingua::Ispell::path, '-a', '-S', @options, ); ... } sub spellcheck { _init() or return(); # caller should really catch the exception fro +m a failed open2. my $line = shift; local $/ = "\n"; local $\ = ''; chomp $line; $line =~ s/\r//g; # kill the hate $line =~ /\n/ and croak "newlines not allowed in arguments to Lingua +::Ispell::spellcheck!"; print Writer "^$line\n"; my @commentary; local $_; while ( <Reader> ) { chomp; last unless $_ gt ''; push @commentary, $_; }
By the by, I'm trying to write a litte script to check fields in a database for spelling errors and write out a log of misspelled words. Any ideas on what I'm doing wrong? ( I can't even run the example code for these modules without hanging. Oh, I'm on a Windows machine and cannot use a real operating system.)while ( <Reader> ) {
|
---|
Replies are listed 'Best First'. | |
---|---|
Re (tilly) 3: need help with open2, please!
by tilly (Archbishop) on May 03, 2001 at 07:06 UTC | |
by Anonymous Monk on May 06, 2001 at 10:26 UTC | |
by tilly (Archbishop) on May 06, 2001 at 15:38 UTC | |
by gcomeaux (Novice) on May 09, 2001 at 19:51 UTC |