I am working on a perl module and looking for an output (string) of the form : a:value1 OR a:value2 OR a:value3 OR ...
The values value1, value2, value3...
are in an array (say, @values).
I know we could use join( ' OR ', @values )
to create a concatenated string of the form: value1 OR value2 OR value3 OR ...
But as you see above, I need an additional a:
to be prepended to each value.
What would be a neat way to do so?