String comment_a = "/* this is not a comment */'; String comment_b = "" + // /* "this is actually used" + // */ ""; #### if ( length $line ) { if ($line =~ m|^\s* // |x or $line =~ m|^\s* /\* |x or $line =~ m|^\s* \* |x) { $comment = $comment + 1; } else { print "$line\n"; $code = $code + 1; } }