|There's more than one way to do things|
s/.// increases length - bug or badly documented featureby Juerd (Abbot)
|on Mar 01, 2002 at 07:57 UTC||Need Help??|
Juerd has asked for the wisdom of the Perl Monks concerning the following question:
Hi fellow monks,
Should or should it not be possible that s/.// increases a string's length (as reported by length)?
I think it should not be, but if it for any reason should, please let me know.
It is possible to create a string, s/.// it, and have a length that is greater than the length before the substitution was made. The only thing I ask is if it should be possible.
As a little background information, I quote from perldoc -f length:
Returns the length in characters of the value of EXPR.And a bit from perldoc perlre:
. Match any character (except newline)