Perl Monk, Perl Meditation | |
PerlMonks |
Re^3: RFC: List::Extractby lodin (Hermit) |
on Nov 25, 2007 at 01:37 UTC ( [id://652780]=note: print w/replies, xml ) | Need Help?? |
Thanks for you feedback. About keeping or discarding changes. Currently I'm leaning towards keeping changes in the returned list, but discarding changes for the other elements. Here's an example that motivates keeping the changes for the returned list: If changes are discarded you'd have to do ugly workarounds to not duplicate the logic. But if the changes are kept and you don't want them it's trivial to change the behaviour: just add local $_ = $_;. The reason I want to discard changes for elements left in the array is that if changes is kept for the returned array then changes are kept for all elements, and then you can usually just as well do those changes to the array before extract. lodin
In Section
Meditations
|
|