I would like to get the first word from each row of my @AoA[][] and push it into the array @kmers. Can anybody help me get there? This is what I've done so far. Thanks in advance everybody!
my(@kmers); my($x) = 0; my($y) = 0; for ($x=0, $x<7, $x++){ for ($y=0, $y<$AoA[$x], $y++){ my($firstword) = ''; $firstword = $AoA[$x][$y] =~ /^(\w+)/; push @kmers, $firstword; print $firstword."\n"; } }
In reply to First word by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |