Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / gist:1785505
Created February 10, 2012 02:07
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
sub modhash(&\%) {
my ($sub,$h) = @_;
foreach my $k (keys %$h) {
my $v = delete $h->{$k};
($k,$v) = $sub->($k,$v);