#!/usr/bin/perl use strict; use warnings; my %hash = ( foo => { bar => "SELECT * FROM mytable ", }, ); $hash{foo}{bar} .= "WHERE user=? "; $hash{foo}{bar} .= "AND email=? "; use Data::Dumper; print Dumper \%hash; __END__ $VAR1 = { 'foo' => { 'bar' => 'SELECT * FROM mytable WHERE user=? AND email=? ' } };