/usr/share/doc/libwww-youtube-download-perl/examples/parallel.pl is in libwww-youtube-download-perl 0.58-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | use strict;
use warnings;
use WWW::YouTube::Download;
use Parallel::ForkManager;
my $urls = [qw{
http://www.youtube.com/watch?v=kKVYVj5-wQ0
http://www.youtube.com/watch?v=gtezI4QriS0
http://www.youtube.com/watch?v=rTJbGp8og7g
}];
my $pm = Parallel::ForkManager->new(scalar @$urls);
for my $url (@$urls) {
my $pid = $pm->start and next;
my $client = WWW::YouTube::Download->new;
$client->download($url);
$pm->finish;
}
$pm->wait_all_children;
|