s/(\s\?|\?\s)|\?/$1 || "'"/eg; # Look ma, no look behind/ahead #### 1 while s/(\S)\?(\S)/$1'$2/;