When should I use ANTLR instead of PERL?
It really depends on what you are trying to do. ANTLR is a parser that allows you to define vocabularies/grammars through a meta-language and then uses the grammar to parse input, like the lex/yacc duo, into strings and tokens for analysis with a language like Java or C/C++. Perl on the other hand is typically used for manipulating text files, where the files don't have as hard a defined format. While it can be used to parse a document into tokens (give me a list of words in a file is fairly easy to do with perl), it isn't its primary purpose.