From: michael20545 on
Thank you Martin, Willem, sln, Wolf for your replies,
but I found that Inkscape does not work (at least on Windows) in
multiple instances :(

But your suggestions were useful for creating graphs with gnuplot (11
vs 27 seconds for creating 215 graphs).
Here is the last version (thanks Wolf for suggestion to use Thread::Queue).

use strict;
use threads;
use threads::shared;
use Thread::Queue;
my @files=<*.gp>;
my $q=new Thread::Queue;
$q->enqueue($_) for @files;
my @threads;
push @threads,threads->new(\&make_svg,$_) for 1..3;
$_->join for @threads;
sub make_svg
{
my $thrnum=$_[0];
while(my $file=$q->dequeue_nb)
{
print "$thrnum $file\n";
`gnuplot $file`;
}
}

--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---