Dude, just use cperl-mode (or the equivalent) and let it do your indentation for you. Then you can get on to thinking about your actual code. As far as your third point, automatic paren matching is forty-year-old technology, and any text editor that doesn't do it is lame in the extreme. Get a better text editor.