Problems? Is your data what you think it is? | |
PerlMonks |
Re^2: Ways to delete start of stringby ysth (Canon) |
on May 25, 2008 at 06:13 UTC ( [id://688354]=note: print w/replies, xml ) | Need Help?? |
Both the 4-arg substr (I find left-side a confusing term) and s/// avoid copying, so should be
more or less constant. They do this by just adjusting the beginning pointer into the string buffer
and noting the offset used in the slot usually used for integer value. This is called the OOK hack
(OOK being the flag set to indicate the integer slot is storing an offset).
In Section
Seekers of Perl Wisdom
|
|