I am writing out a couple of files that are utilizing the same output structure. In order to save lines of code I have created a subroutine to perform the action. After I asked the question I went to my books and found what was needed. The files change sizes due to removal of duplicates...
Is it possible to use a variable for a file handle.
EX.
sub printReport($handle,@array,$arraySize){
for ($i=0;$i<$arraySize;$i++){
print ($handle "$array[$i]\n");
}#end for
}#end sub printReport
I was able to kick up the desired number of threads after reinstalling ActivePerl 5.8.6. not sure what the initial issue was but the code i was using seems to be the correct syntax. Thanks for everyones help. :)
ERDMAN
I have the specified number of threads during the initial declaration as you have described. My issue is that it never "starts" any number of process near the max. I am underutilizing the machine resources when I need to nearly max out the dedicated box for my scans. Is there any way to...
I am using the Parallel:ForkManager to multi-thread some of the processes I need to run very quickly on many machines. Unfortunately, after specifying the max number of threads the script is not coming even close to the max. Is there something i can add to the script to force it to create more...
Let me be more specific.
I dont understand how this code:
#!/usr/bin/perl -w
my $pid = 0;
my $forked=0;
my @family;
for ($i = 0; $i<2; $i++){
$pid=fork or warn "Couldn't fork: $!\n";
$forked *= 2;
print "For Loop forked, $forked\n";
print "For Loop pid, $pid\n";
if ($pid) {push...
Fork() is ported for windows with a few caveats. My issue is I have not used fork before and do not quite understand the functionality of the command. I have been unable to find a simple generic example of Fork being utilized for anything.
I have created a script that takes a machine||ip list and then checks to see if particular patches have been installed. Unfortunately, the script currenly is linear. I am wanting to speed up the process by running the query against multiple machines without waiting on a previous machine to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.