Aspell, perl and piping

Discussion in 'Perl Misc' started by Bill H, Mar 26, 2008.

  1. Bill H

    Bill H Guest

    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
    Bill H, Mar 26, 2008
    #1
    1. Advertising

  2. Bill H

    Ben Morrow Guest

    Quoth Sherman Pendley <>:
    > Bill H <> 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
    Ben Morrow, Mar 27, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    1,542
    Roedy Green
    Jan 9, 2006
  2. Gary Bishop

    ANN: Pyrex wrapper for the Aspell API

    Gary Bishop, May 24, 2004, in forum: Python
    Replies:
    3
    Views:
    408
    Gary Bishop
    May 24, 2004
  3. Sum

    URGENT --- Aspell Scores

    Sum, Jan 11, 2005, in forum: Perl Misc
    Replies:
    1
    Views:
    74
    Tad McClellan
    Jan 11, 2005
  4. Aspell word lists

    , Jun 30, 2005, in forum: Perl Misc
    Replies:
    3
    Views:
    98
  5. Bill H
    Replies:
    0
    Views:
    88
    Bill H
    Sep 2, 2007
Loading...

Share This Page