Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: using split delimiters

by krujos (Curate)
on May 23, 2002 at 21:36 UTC ( #168903=note: print w/replies, xml ) Need Help??

in reply to using split delimiters

You are correct. In this example the ?: is dumb. I canít think of a case off hand where you would want to do that in a split, I donít think one exists.... Other monks please correct me if I am wrong.
thanks ---Mogaka

Replies are listed 'Best First'.
Re^2: using split delimiters
by Aristotle (Chancellor) on May 24, 2002 at 05:29 UTC
    You may want to do it with something like /begin(?:block)?/ - note the question mark quantifier, or maybe in case of a backreference. I know I've needed this once or twice; it's not terribly common however.

    Makeshifts last the longest.

      If you needed it for a backreference though you'd use normal ( ) braces instead of the (?: ) braces seen here which are specifically intended not to store their results.

        Sorry, you are right of course.

        Makeshifts last the longest.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://168903]
[marto]: yes
[Discipulus]: thanks i definetively must learn such stuff.. i must come out with a killing product and after i'll just do Perl elctronic and music.. ;=)
marto has a similar idea on the 'to do' list
[Discipulus]: 65-35 joint venture marto? ;=)
[choroba]: Fibonacci at 34!

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2017-10-17 09:59 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (225 votes). Check out past polls.