I am working on an org chart app. It is easy to loop through an employee list and get an array of everyone who reports to a given user ID (say, a vice president), but my logic breaks when I try and loop through the list again and get arrays of everyone who reports to the managers in the initial array. Any help?
$name = 'bsmith'; open (FH); while (<FH>) { (@junk, $sup) = split(/\,/,$_); if ($sup eq '$name') { push (@underlings, $_); } } close (FH); foreach $under (@underling) { open (FH); while (<FH>) { (@junk, $sup) = split(/\,/,$_); if ($sup eq '$under') { #this is where it breaks, I need a separate array of underlings for each #CDS ID in underlings, but it doesn't know which CDS IDs will be in #underlings before it begins. This throws all into one array. #Useless for my purpose. push (@under_underlings, $_); } } close (FH); } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]