Help for this page

Select Code to Download


  1. or download this
    my %name = (1, "A", 2, "B", 3, "C", 4, "D");
    my %parent = (1, 0, 2, 1, 3, 2, 4, 3);
    
  2. or download this
    sub get_parent_value {
        my $parent_key = $parent{$key};
        my $parent_value = $name{$parent_key};
        return $parent_value;
    }