in reply to Getting the output of a shell command

open (DIR, '>> c:\dir\dir.txt') || die "Can't open file; $!" ; my $dir = `dir *.pl`; print DIR $dir;
Should do the trick for you. $dir gets the whole output of dir (via backticks), print $dir to the outfile.

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
    sorry (didn't mean to imply that it didn't)yours worked too.

    lmoran@wtsgSPAM.com
    print "\x{263a}"