$hr->{foo$nr} = "test$nr"; $hr->{'foo'.$nr} = "test$nr";