>>>>> "a" == autrijus <[EMAIL PROTECTED]> writes:
a> * S05: Oops, turns out I entirely read perlop.pod incorrectly; a> "it matches once only" means "it matches successfully once only", a> not "it performs the match once only". Sorry, TimToady++'s a> original example of: a> (state $x) ||= / pattern /; a> was correct. a> +To reset the pattern, simply say C<$x = 0>. i did a fresh read of S05 due to all the recent activity (i will post some edits and questions soonish), but that example baffles me. how does it emulate the (never used by me) // of p5? my take would be that the rx would be or-assigned to $x and it would remain set through repeated calls to the outer sub (assuming a sub). what is the context that makes it match against $_ vs returning an rx. wouldn't the assignment bleed into the the //? or is $x || /pattern/ going to do a match if it $x is false? in any case, one quick comment on S05 is it needs some more examples and some explanations of how the examples do what they are claimed to do. i know this is a synopsis/spec but some places do go into more explanation with examples than others. i would like to see it more consistant at that level. thanx, uri -- Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org