$currentSenctence is predefined.sub getFeatures { my @tokens = split /\s+/, $_[0]; return @tokens; } if($currentSentence =~ /<@> <s> ([\S\s]+) <head>lines?<\/head> ([\S\s] ++) <\/s> <@>/) { my @temp = getFeatures("$1 $2"); foreach my $variable (@temp) { $features{$variable} ++; } }
In reply to assign array to hash by lobs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |