There also is a module which implements the part function...
see: List::Part
use List::Part; my ( $in, $out ) = part { m/$hit/ } @pids;
Where $in is an arrayref to the matches, and $out to the rest.
In reply to Re^2: for loop trouble
by fishbot_v2
in thread for loop trouble
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |