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;

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Increase response time
by SteveS832001 (Sexton) on May 11, 2006 at 20:49 UTC
    It already does it on a mass level i was just letting everyone know

      In that case, you will not be interested in this version of your code that runs clean under strict and warnings and is now in a form that would make it easy to run the updates 10, or 20 or even 100 machines at a time in parallel.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.