in reply to Re^2: elegant way of handling hash?
in thread elegant way of handling hash?

You could try

my %replacehash = ( TEMP1 => $flow->getExeName(), TEMP2 => $flow->getTempName(), TEMP3 => $flow->getData()->getNameType(), )
(If you call a method with no arguments, like here, you could also omit the empty pair of parentheses, but that's not the point here.)

Also

my %replacehash; @replacehash{map { "TEMP$_" } 1 .. 3} = ( $flow->getExeName(), $flow->getTempName(), $flow->getData()->getNameType(), )