$SQL='select * from table where :name=:value'; $SQL=~s/:(\w+)/$data{$1}/g;