Hello monks,
dumb question, but I am trying to change the following grep:
my @tags = split /\t/, $line; my @Definition=("NN", "NNS"); next unless (grep {$_ eq $tags[ 1 ]} @Definition);
in order that it matches only at the beginning of the string. I thought that the following would do it, but I was wrong...:
next unless grep($_ =~ /^$tags[1]/, @Definition);
In reply to grep beginning of string by IB2017
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |