Aspell, perl and piping

B

Bill H

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
 
B

Ben Morrow

Quoth Sherman Pendley said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top