smackdab has asked for the wisdom of the Perl Monks concerning the following question:
For debugging, I tried:my ($reader, $writer) = (IO::Handle->new(), IO::Handle->new()); my $command = "sort /reverse"; eval { open2($reader, $writer, $command); }; if ($@) { warn "CRAP $! $@ \n"; } foreach (@data) { print $writer $_ ."\n"; } close ($writer); while ($_ = $reader->getline()) {print $_;} close ($reader); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: confused (and frustrated) about stdin/out
by kwoff (Friar) on Dec 03, 2001 at 03:51 UTC | |
by smackdab (Pilgrim) on Dec 03, 2001 at 05:19 UTC | |
by Fastolfe (Vicar) on Dec 03, 2001 at 06:35 UTC | |
by Beatnik (Parson) on Dec 03, 2001 at 20:16 UTC |