From: Steven McDonald Date: Sat, 8 Nov 2014 12:21:17 +0000 (+1100) Subject: Don't use keys on a hashref X-Git-Url: http://git.steven-mcdonald.id.au/?a=commitdiff_plain;h=a76f0d2fa04a686536c2d937c2b3f16b3aec4caa;p=openbsd-goodies.git Don't use keys on a hashref Older Perls don't handle this properly, and it'd be nice to be able to use this on older versions of OpenBSD. --- diff --git a/devtree/devtree b/devtree/devtree index adadaae..ed094b7 100755 --- a/devtree/devtree +++ b/devtree/devtree @@ -47,7 +47,7 @@ sub print_tree { my $prev_indent = shift || ""; my $indent = $prev_indent . " |"; my $count = 0; - my @keys = keys $tree; + my @keys = keys %$tree; for (sort @keys) { my $name = $_;