if ($line =~ /(\s+|^)(for\()/gi) { print 'match'; }