in reply to Return all the data from child to parent with Parallel::Forkmanager

@eval_code=("read_genome();","read_mapfile();","read_GTF();","read +_RM();"); foreach$eval_code(@eval_code) { eval$eval_code; }
Yikes! Since other monks have answered your actual question, I'm just going to point out that there's a better way to do this:
my @subs = (\&read_genome, \&read_mapfile, \&read_GTF, \&read_RM); foreach my $sub (@subs) { &$sub(); }

Replies are listed 'Best First'.
Re^2: Return all the data from child to parent with Parallel::Forkmanager
by Corion (Patriarch) on Aug 18, 2017 at 13:52 UTC

    Also, why not just:

    my $ok = eval { read_genome(); read_mapfile(); read_GTF(); read_RM(); 1; }; if( ! $ok ) { warn "Got error while reading: $@"; };
      ... because the whole purpose of this exercise was to try to read the files in parallel?

        Aaah - I had missed that within that loop, there also is a $pm->start and next.

        Still, I wouldn't use string-eval there :)