in reply to Re: Variables loop in Parallel::ForkManager
in thread Variables loop in Parallel::ForkManager
Thank you but it doesn't work...Maybe I'm doing something wrong : #!/usr/bin/perl use Parallel::ForkManager; my $pm = new Parallel::ForkManager(3); my @y; { open my $fh_y, '<', 'y' or die $!; chomp( @y = <$fh_y> ); } open(my $fh_x, '<', 'x') or die $!; while (<$fh_x>) { $pm->start and next; chomp( my $linex = $_ ); open my $fh_out, '>', $linex or die $!; for (@y) { print $fh_out ("$linex$liney\n"); } $pm->finish } When I perl script.pl it gives me the 5 "$filex" files but like this : jacky@ubuntu:~/Desktop/test$ cat 1 1 1 1 So definatelly there is something wrong in there...Thank you again
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Variables loop in Parallel::ForkManager
by ikegami (Patriarch) on Nov 29, 2008 at 23:50 UTC | |
by jackyex (Initiate) on Nov 30, 2008 at 08:22 UTC | |
by ig (Vicar) on Nov 30, 2008 at 09:29 UTC | |
by ikegami (Patriarch) on Nov 30, 2008 at 15:54 UTC |