in reply to First word
Here is an SSCCE for you repurposing your own regex:
#!/usr/bin/env perl use strict; use warnings; my @AoA = ( ['first word', 'greek latin'], ['alpha omega', 'beta test'] ); my @firsties; for my $outer (@AoA) { for my $inner (@$outer) { push @firsties, $inner =~ /^(\w+)/; } } print "@firsties\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: First word
by afoken (Chancellor) on Oct 22, 2016 at 07:04 UTC | |
by Marshall (Canon) on Oct 22, 2016 at 12:47 UTC | |
|
Re^2: First word
by Anonymous Monk on Oct 21, 2016 at 12:02 UTC | |
by GotToBTru (Prior) on Oct 21, 2016 at 12:39 UTC | |
by hippo (Archbishop) on Oct 21, 2016 at 12:40 UTC | |
by Marshall (Canon) on Oct 22, 2016 at 00:56 UTC | |
by hippo (Archbishop) on Oct 22, 2016 at 08:58 UTC |