Is $string =~ s/^/$prefix/; about the same speed as the substr expression?
To me, it would more signal the intent than substr does. Then again, so does the pesky dot-between-strings notation, which 1nickt doesn't want. :-) But, as with the substr, the =~ s/^// version doesn't require duplicating $string in your statement, which is one of the benefits of the suffixing .= operator.
In reply to Re^4: Reversed .= operator
by pryrt
in thread Reversed .= operator
by 1nickt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |