Use the following code to match the case insensitive.
if($line=~/$pattern/i) { $found++ } [download]
In reply to Re^2: case sensitive addition by murugaperumal in thread case sensitive addition by Nathan_84