The documentation of grep clearly states:perl -E '@dipept = qw/XX AA BB CC DDAAD AAAAAAA/; $FMat[0][0] = grep(/ +AA/, @dipept); say $FMat[0][0]' 3
In scalar context, returns the number of times the expression was true.What input do you have? What output do you expect?
In reply to Re: Using grep in a scalar context
by choroba
in thread Using grep in a scalar context
by newbie1991
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |