Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Aspell, perl and piping

Reply
Thread Tools

Aspell, perl and piping

 
 
Bill H
Guest
Posts: n/a
 
      03-26-2008
I am hoping someone can give me a few pointers on where to look for
more information on this. I am using Aspell on a linux box to suggest
corrections for mispelled words using a command such as:

aspell -a < checkthis.txt > errors.txt

at the command prompt and this is fine. What I want to do next is
receive the text from an html form and using perl pipe this out to
aspell and get the list of errors back. I could write the text to be
checked to a file and then use somthing like

system("aspell -a < checkthis.txt > errors.txt");

but I would like to avoid if possible having to write the file and
then open and read the errors.txt file. Is there a way to pipe this
information straight from perl and get the results back?

If I am missing something or if I could find this in the perldocs,
please let me know.

Bill H
 
Reply With Quote
 
 
 
 
Ben Morrow
Guest
Posts: n/a
 
      03-27-2008

Quoth Sherman Pendley <(E-Mail Removed)>:
> Bill H <(E-Mail Removed)> writes:
>
> > system("aspell -a < checkthis.txt > errors.txt");
> >
> > but I would like to avoid if possible having to write the file and
> > then open and read the errors.txt file. Is there a way to pipe this
> > information straight from perl and get the results back?

>
> Have a look at IPC::Open2, or IPC::Open3 if you're also interested in
> stderr.


IPC::Run is easier to use, and harder to get wrong.

Ben

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
perl PIPE - need an example of piping in seth Perl Misc 8 06-11-2005 05:49 AM
Piping std::cout to a std::ostringstream. Jason Heyes C++ 1 02-06-2005 03:15 PM
Piping between Functions christopher diggins C++ 4 01-10-2005 09:30 PM
piping data Jeff Kish Java 1 10-15-2004 12:29 PM
Piping ping into perl-prog bernd wegener Perl 3 09-22-2004 06:32 PM



Advertisments