Next | Tricks of the Wizards | 48 |
sub package_install { my ($h, $p) = @_; my $n; while ($n = each %$h) { my $v = $h->{$n}; *{$p . '::' . $n} = (ref $v ? $v : \$v); } }
Scalar context each just returns the keys one at a time
Next | Copyright © 2003 M. J. Dominus |