in reply to Re^8: Perl modules or standard tools for searching hierachical data
in thread Perl modules or standard tools for searching hierachical data

You're acting like a doofus. You're missing a simple point. You have records that are delimited by "|" and terminated by "\r\n" (or maybe just "\n"), so:

As your read your input data record by record, you must use "chomp" to remove the line termination and then you must split on "|". I've already mentioned both of these details in two previous replies. I'm done now. If you still can't get it, I'm sorry for you.

while (<DATA>) { chomp; # YOU NEED TO DO THIS my ($c, $p) = split( /\|/ ); # THEN DO THIS ...
  • Comment on Re^9: Perl modules or standard tools for searching hierachical data
  • Download Code

Replies are listed 'Best First'.
Re^10: Perl modules or standard tools for searching hierachical data
by SlackBladder (Novice) on Mar 20, 2007 at 10:50 UTC
    Hello, I did say my PERL programming skills were limited ! I have it sorted now, many thanks for your help.
    One thing that was also causing an issue (which I had not been informed of) was the fact that the hierarchy is actually broken anyway :-( No one even mentioned that this would be the case.
    SlackyB (aka Doofus)