while ( (my ($key,$atr)) = (each %vars)) { print "$key, $atr\n"; my $method = "prefix_$key"; $f->$method( $atr ); }