Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Can we "grow" a string?by mscharrer (Hermit) |
on Jun 17, 2009 at 08:42 UTC ( [id://772276]=note: print w/replies, xml ) | Need Help?? |
This is supported by substr. Its perldoc says:
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".
In Section
Seekers of Perl Wisdom
|
|