Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: (Quiz) To split, or not to split?

by japhy (Canon)
on Nov 05, 2001 at 09:06 UTC ( [id://123279]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://123279]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found