Use perl to find perl errors.
#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11163431 use warnings; my @what_lines; @ARGV = '3raindeermaze.pl'; # FIXME while( <> ) { for ( split // ) { /\{/ ? push @what_lines, $. : /\}/ ? pop @what_lines : 0; } } print "line numbers with unmatched { => @what_lines\n";
Comment out the ARGV line to use your file as the argument to the program.
( I just did that for testing. )
In reply to Re: How do I find the missing curly brace??
by tybalt89
in thread How do I find the missing curly brace??
by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |