Skip to content
Snippets Groups Projects
Commit efb11cc5 authored by Kieron Taylor's avatar Kieron Taylor :angry:
Browse files

Corrected example code. It was misusing the wrap_array method.

parent 0d3d61ba
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
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