# Create a temporary file to hold the input. my ($fh, $filename) = tempfile(); # And stream everything into it. my $linecount = 0; while (<>) { $fh->print($_); $linecount++; } print STDERR "Wrote $linecount lines to $filename.\n"; # Now pass the input off to aspell for processing my $obj; my $appname = "C:\\Program Files\\Aspell\\bin\\aspell.exe"; my $cmdline = "--check $filename"; my $iflags = 0; my $cflags = NORMAL_PRIORITY_CLASS + CREATE_NEW_CONSOLE; my $curdir = "."; Win32::Process::Create( $obj, $appname, $cmdline, $iflags, $cflags, $curdir) or die "Couldn't shell to aspell.\n"; $obj->Wait(INFINITE); # Return the tempfile on standard output seek($fh, 0, 0); while (<$fh>) { print }