Hi everybody. Being relatively new to perl is am still having problems applying what I know to my needs. How do I impose a condition in an if cicle for matching the first word of a string part of an @AoA data structure with the first word of a string in another array? My goal is then to add the second word of the first string to the second string. Thank you all very much in advance
my($other_array) = ''; foreach $other_array (@other_array){ foreach my$arr (@AoA){ foreach my$sca (@$arr){ $sca if (($sca =~ m/\w+/g)[0] eq ($uniq_kmers =~ m/\w+/g)[0]){ $uniq_kmers =~ "\t".($sca =~ m/\w+/g)[1]; }else{ $uniq_kmers =~ "\t0"; } } } }
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |