Parallel processing of XML files

Viewed 632

Currently, I have an application which is using XML::Twig and parses 20 XML files. Each file amounts to 0.5GB and the processing is done in a sequential manner:

foreach (@files) {  
    my $ti = XML::Twig->new( 
        keep_encoding => 1,
        twig_handlers => {
            'section' => sub { $_->purge(); }
        }
    )->parsefile($_);
}

Is there a way with perl to run this code in parallel and if yes how can I do it? My application runs on a Windows system.

1 Answers
Related