in reply to Re: Writing a parser
in thread Writing a parser

Just based on what you are telling us, I would second this approach. I've written the following code many times:

while (<FH>) { s/#.*$//; my @args = split(' ', $_); next unless @args; ... process command ... }

If, however, you have any recursive syntactical elements (like begin/end grouping symbols which need to be matched), a proper parser written with Parser::RecDescent is probably in order.