Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
There's a whole aspect of this question which nobody has touched on yet. I'm talking about the precise meaning of "first char". Consider the situation when $s is a utf-8 string. The first "character" could be several bytes long.
This means that the regexp and chop methods will work on full "characters", but substr operates on "bytes". I attended a talk recently at london.pm on this subject, the slides of which are here. -- In reply to Re: cut of first char of a string
by rinceWind
|
|