in reply to Re^8: constructing a tree from csv file
in thread constructing a tree from csv file

To avoid the warnings, just do not print anything if the relation is not defined:
print " = ", $path_string, ', ', $group{$path_string} // q();
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^10: constructing a tree from csv file
by zing (Beadle) on Nov 21, 2013 at 04:13 UTC
    Choroba what if I dont want those lines which dont have a group (from the group hash) to be "even" printed ? For example a line which has relation : E.E.E.P.Pl doesnt have a corresponding key-value pair in the group hash, so I would like this complete row to not even get printed. I guess something has to be added in this line   print " , ", $path_string, ', ', $group{$path_string};
      Use a condition:
      print " , ", $path_string, ', ', $group{$path_string} if exists $group +{$path_string};
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ