in reply to Using grep in a scalar context
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using grep in a scalar context
by newbie1991 (Acolyte) on Feb 06, 2013 at 13:37 UTC |