On Mar 18, 2011, at 12:03 PM, C.DeRykus wrote:

> Neat solution.  IMO, though, it's much clearer and simpler
> (particularly for subsequent maintainers), to identify errors
> up front if you can and save the time and complexity to
> review \G and pos() and the implication of a  s/// return
> count (unless of course you're using them all the time).

This raises the question: is it possible, using a recursive regex and s/// or 
m//, to - in one fell swoop - identify a correctly-formed string AND save the 
key=value pairs into a hash?

Eons ago, when writing a SNOBOL4 program to match an arbitrary algebraic 
expression, I tried to make it evaluate the expression as it "unwound."  I 
never succeeded -- so it's become something of a holy grail for me.  Not a 
highly important one, though ;-)



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to