my @new_array = map { (split /:/)[3] } @old_array;
Note that I have relied on split's default of splitting $_ when not provided with an explicit string. So the above is exactly equivalent to
my @new_array = map { (split /:/, $_)[3] } @old_array;
In reply to Re^3: Make array from field of another array
by kennethk
in thread Make array from field of another array
by Saved
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |