Commit efb11cc5 authored by Kieron Taylor's avatar Kieron Taylor 😠
Browse files

Corrected example code. It was misusing the wrap_array method.

parent 0d3d61ba
......@@ -47,16 +47,16 @@ while (defined($feature) ) {
#do something with the feature, e.g. print hash keys and values
foreach my $key (keys %feature) {
if ($key ne 'attribute') {
print $key . " " . $feature{$key} ."\n";
} else {
print $key . "\n";
my %attribs = %{$feature{$key}};
foreach my $attrib_key (keys %attribs) {
my $values = $attribs{$attrib_key};
printf("\t%s %s\n", $attrib_key, join(q{, }, wrap_array($values)));
}
}
if ($key ne 'attribute') {
print $key . " " . $feature{$key} ."\n";
} else {
print $key . "\n";
my %attribs = %{$feature{$key}};
foreach my $attrib_key (keys %attribs) {
my $values = $attribs{$attrib_key};
printf("\t%s %s\n", $attrib_key, join(q{, }, @{wrap_array($values)}));
}
}
}
print "\n\n";
$feature = $parser->parse_next_feature();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment