in reply to Getting the output of a shell command
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Getting the output of a shell command
by ellem (Hermit) on Jun 04, 2001 at 23:24 UTC |