Better would be to attach some actual lines of example Juniper config file output and your attempt at parsing it in Perl. Update: I guess that it could be that "Sample firewall configuration file " is actually some real file, if so then what do you want to do with it?