in reply to Getting the output of a shell command
Why not:
: : open FOUT,">> c:\dir\dir.txt" or die "couldn't open for writing: $!"; open PIPE,"dir |" or die "can't pipe!$!"; while ($line=<PIPE>){ chomp $line; # do something with it... printf FOUT "%s$/",$line; # or whatever } close FOUT; close PIPE;
| Peter L. Berghold | Schooner Technology Consulting, Inc. |
| Peter@Berghold.Net | www.berghold.net |
| Unix Professional Services | |
|
|---|