> p='value' -> result: 'value_string'
> p='' -> result: 'string'
A variation of your first solution:
$p${p:+_}string
I don't see how it could be significantly simpler than this.
--
Sent with
HEY