in reply to <JUNCTION>; how to recognize
here is a post I have bookmarked on junctions. I've never found the Round Tuit to use that as a starting point for updating some of my personal scripts which could benefit from being able to recognize junctions1... so hopefully this link will help you get started down the right path.
update 1: this started as a fully fledged thought, but apparently didn't get fully typed: "...recognize junctions, so I don't have the expertise to help you any further... so hopefully..."
In Section
Seekers of Perl Wisdom