Should do the trick for you. $dir gets the whole output of dir (via backticks), print $dir to the outfile.open (DIR, '>> c:\dir\dir.txt') || die "Can't open file; $!" ; my $dir = `dir *.pl`; print DIR $dir;
In reply to Re: Getting the output of a shell command
by the_slycer
in thread Getting the output of a shell command
by ellem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |