Hi,
I have this code:
my %hash; foreach my $dir (@dirs) { if (-e "$dir/syn.log") { proccess_1_file("$dir/syn.log"); } } sub proccess_1_file { my $file = $_[0]; open(my $fh, "$file") or die "cannot open $file $!"; while (<$fh>) { chomp; my $line =$_; if ($line =~ /^area=(.*)/) { $hash{"$dir"}{"area"} = $1; }
I want to parallelise the files processing.<\p>
something like having a thread for each $dir, while all thread update the $hash.
How can I do that?
Thx
Guy
In reply to hashes & threads by gravid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |