This can't be done directly since the search and replace functions return the number of matches, not the string.
But you could do this:
$word = 'blah';
print my_sub(map {s/blah/cow/; $_} ($word));
although it _is_ a one-liner it won't get a beauty price either.
--
Jaap Karssenberg || Pardus (Larus)? <pardus@cpan.org>
>>>> Zoidberg: So many memories, so many strange fluids gushing out of patients' bodies.... <<<<