in reply to Re: transliterate a sub-string
in thread transliterate a sub-string
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".
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: transliterate a sub-string
by Anonymous Monk on Jan 16, 2013 at 09:05 UTC |
In Section
Seekers of Perl Wisdom