Re: [PBML] Is there a function similar to chop but effective on the start of a string?
- Jeff 'japhy' Pinyan wrote:
> I'll concede the ^ anchor to you, but you missed the part of my post whereOops. I stand corrected.
> I said the /s modifier allows . to match newline.
> But still, a regex is overkill for something like this. We're not trying
> to match a pattern, we're trying to remove the first character of a
> string, and substr() is more appropriate here.
I still don't know why anyone would do this. chomp() was invented
because chop() discarded characters without testing them. Either this is
a homework assignment or the OP is making dangerous assumptions.