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 | |
In reply to Re: Getting the output of a shell command
by blue_cowdawg
in thread Getting the output of a shell command
by ellem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |