On 7/21/11 Thu Jul 21, 2011 4:27 PM, "newbie01 perl" <newbie01.p...@gmail.com> scribbled:
> Hi all, > > In Oracle, there is a file named tnsnames.ora that contains connection > strings to Oracle Databases. > > At the moment the file is 10000+ lines long. We are currently having a > problem where the file is malformed, i.e. missing matching brackets. Can any > of the experts please advise how best to check for malformed stuff. > > I believe Perl is very good at doing this kind of stuff. I've managed to > find some command line options from Google and trying that out. > > For the meantime, hopefully someone from this group have had this same > problem in the fix and has a script that checks for malformity. There is a relevant discussion of just such a problem (perhaps even more complicated than yours) going on in several, cross-posted Usenet news groups. See here: <http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/c52aee1e439 2436e/5df042e35bf9bb80?hl=en&q=group:comp.lang.perl.misc> One Perl solution is here: <http://pastebin.com/d8GNL0kx> You can simplify these solutions somewhat by reducing the delimiter set. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/