in reply to Re: MCE: How to access variables globally
in thread MCE: How to access variables globally
Kia ora!
Yes, this is the crux of it but I avoided gathering from mce_loop_f in this way
Because (and I can be totally wrong in assuming so) gather will only return %hash2 in this instance while I am also interested in returning $counter2. The docs show gather can be called multiple times, doing so will complicate teasing apart the returned output from mce_loop_f{}. It would be great if gather can behave a bit like a sub so WYSIWYG%hash2 = mce_loop_f { MCE->gather(split ' ', $$_); } $data_file;
#hypothetical code: #alas if gather can gather two or more data types (%hash2, $counter2) = mce_loop_f { my $internal_counter2++; MCE->gather(split '\s', $$_, $internal_counter2); #return data typ +es } $DATA_F;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: MCE: How to access variables globally
by kcott (Archbishop) on Dec 20, 2021 at 02:18 UTC | |
by biohisham (Priest) on Dec 20, 2021 at 07:15 UTC | |
by marioroy (Prior) on Dec 20, 2021 at 10:51 UTC | |
by kcott (Archbishop) on Dec 20, 2021 at 08:40 UTC |