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. BergholdSchooner Technology Consulting, Inc.
Peter@Berghold.Netwww.berghold.net
Unix Professional Services