sub complete_inchi_parse { my $inchi = shift; my @inchibits = split(/\//,$inchi); my @molecules = 1; my @hydrogens; my @pileofinchis; #several more arrays to catch other string fragments foreach my $section (@inchibits) { if ($section =~ /^h/) # if section begins with a marker { @hydrogens = split(/;/,$section); } #other similar if statements that break sections into other arrays } for (my $index=0; $index