>     foreach @bigarray {
   >       sub {
   >         yield (push @array1, $_);
   >         yield (push @array2, $_);
   >         yield (push @array3, $_);
   >         push @array4, $_;
   >       }->();
   >     };
   > 
   > :-)

As I've said before, Randal, you're a bad, bad man.

Of course, the following *would* work as desired:

         my $unmerge = sub {
            yield  (push @array1, $_);
            yield  (push @array2, $_);
            yield  (push @array3, $_);
            return (push @array4, $_);
        };

        foreach @bigarray {
          $unmerge->();
        }

It's only drawback being that it's appalling. ;-)

Damian

Reply via email to