in reply to How do I delete the first n characters on a line
or$foo = substr($foo,$n) unless(length $foo => $n);
or$substr($foo,0,$n)="" unless(length $foo => $n);
this is generally faster than a regex ;-)$substr($foo,0,$n,'') unless(length $foo => $n);
Originally posted as a Categorized Answer.
|
|---|