in reply to avoiding a particular character or set of characters
-imranmy $inComment = 0; while(<>) { next if $inComment; s|//.*$||; # remove // comments s|/\*.*?\*/||; # remove /*..*/ comments s|^.*\*/|| and $inComment = 0; s|/\*.*$|| and $inComment = 1; # do your pattern matching on $_ here }
|
|---|