Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: Progressive matching w/substitutions

by broomduster (Priest)
on Aug 09, 2008 at 10:50 UTC ( [id://703255]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Progressive matching w/substitutions
in thread Progressive matching w/substitutions

You are correct that there were problems in the OP's code. Since the OP also showed desired output, I was expecting that posted solutions would actually produce that output. Yours and dreadpiratepeter's solutions produced the desired output, but Jstrom's did not.

Or perhaps I misunderstand.

Replies are listed 'Best First'.
Re^5: Progressive matching w/substitutions
by argv (Pilgrim) on Aug 09, 2008 at 16:47 UTC
    You are correct that there were problems in the OP's code. Since the OP also showed desired output, I was expecting that posted solutions would actually produce that output.
    FWIW, my post originally said that I had multiple incantations of the code, none of which worked, and that the one posted was an arbitrary one from that set. I didn't necessarily want to focus on the code, per se, but the more fundamental underlying question: why doesn't progressive matching work with s/// expressions as it does with m//? My code was drawing attention to the byproduct of this lack of support for s/// was the need for too much complexity in the while() loop, which also produced code that (in my case, in my examples) didn't work.

    I think I overcomplicated things by introducing too much stuff into the post.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-03-28 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found