in reply to [perlfunc] does "if" force "grep" into a scalar context?
grep will act as you expect in an if conditional clause. The number of grepped elements will be taken in bool context. Your statement will return undef if $col_count is equal-as-a-string to any of the listed numbers in the selected array from your hash.
If this is not behaving as you want, do you want unless instead of if? Do you mean to use numeric comparison?
After Compline,
Zaxo
|
|---|