in reply to (Quiz) To split, or not to split?

Well, I got two correct answers (regarding pos()) that I wasn't expecting! The answer I had in mind was the using split() will not reset your $DIGIT variables, whereas use of another regex will. But again, I'm glad you guys found something that didn't occur to me. Both of these points are going into my book, by the way.

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Re: (Quiz) To split, or not to split?
by Sweeper (Pilgrim) on Nov 06, 2001 at 11:35 UTC
    Yet another answer (or rather a precision to japhy's solution)
    Not only the $DIGIT variables are reset, also the infamous $& $' $` and the @+ and @- arrays. That's $MATCH, $PREMATCH, $POSTMATCH, @LAST_MATCH_END and @LAST_MATCH_START for those who use English