If you want to count braces, you probably need to skip over any braces which occur inside quotes/strings, or in comments.
Code such as $sub_braces += () = $_ =~ /\{/g; itself will introduce mismatches if you don't filter them out.
In reply to Re: Guessing source code depth with Perl.
by SuicideJunkie
in thread Guessing source code depth with Perl.
by Cap'n Steve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |