in reply to Increase response time
but i also made it so that i can do it on a mass level of 100 or more computers.
How about if you work out how to make your mass rename work, then come back and ask about improving response times.
Hint: In your code each call to Win32::AdminMisc looks something like:
my $thing = Win32::AdminMisc::RenameUser($server, ...
but when you use your mass rename facility, the variable $server is set to a filename with '.txt' on the end:
if ($server =~ m/txt/) { open(DAT, $server) or die "Could not open file!\n"; @computers=<DAT>; close(DAT); foreach $computer(@computers) { if ($computer =~ /\n/) { chomp($computer); } }
So that isn't going to work. You should really learn to pass parameters to your subroutines instead of using global variables. It makes this sort of thing much easier to see.
BTW. The last 5 lines above are effectively the same as
chomp @computers;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Increase response time
by SteveS832001 (Sexton) on May 11, 2006 at 20:49 UTC | |
by BrowserUk (Patriarch) on May 12, 2006 at 03:22 UTC |