|Don't ask to ask, just ask|
Re^2: transliterate a sub-stringby grondilu (Friar)
|on Jan 16, 2013 at 07:18 UTC||Need Help??|
This is neat, but was certainly not obvious. Maybe it is worth reminding that indeed substr can be used as a lvalue, as explicitely said in its perldoc:
You can use the substr() function as an lvalue, in which case EXPR must itself be an lvalue. If you assign something shorter than LENGTH, the string will shrink, and if you assign something longer than LENGTH, the string will grow to accommodate it. To keep the string the same length, you may need to pad or chop your value using "sprintf".