DeryniMagic has asked for the wisdom of the Perl Monks concerning the following question:
This snippet of code works well if I run it from the command line, but does not output anything if I invoke it via a scheduled task. Any pointers as to what I'm doing wrong would be appreciated.
use strict; use IO::File; my @groups = qx/net localgroup/; my $fhout = IO::File->new("g:\\iw-home\\scripts\\Test.txt", 'w'); foreach my $grp (@groups) { print $fhout $grp , "\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Making a system command work via a scheduled task.
by Anonymous Monk on May 08, 2012 at 10:12 UTC |