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"; }
In reply to Making a system command work via a scheduled task. by DeryniMagic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |