Ever spent a lot of time debugging that one missing curly bracket in your source code file? Sure, there are code editors available that help you out with this daunting task. But if you cannot or don’t want to use one of those you can try these ten lines of Perl code:
bracket_detector.pl (also available on our pastebin) accepts any text as standard input and outputs the code, prepending each line with the current “curly bracket level”… Makes it a lot easier to figure out where things went wrong.

Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment