in reply to Scrubbing a string
princepawn,
I have thought about this for 20 seconds. Since your solution disregards order and count, it seems that this can be generalized into saying "this set can't have any members that are in that set". If I were putting this into a module, I would likely use a tied interface to the 3 main data types (hashes, arrays, scalars).
I have thought about this for 20 seconds. Since your solution disregards order and count, it seems that this can be generalized into saying "this set can't have any members that are in that set". If I were putting this into a module, I would likely use a tied interface to the 3 main data types (hashes, arrays, scalars).
It should be obvious how this would work for arrays and hashes but you would run into problems with scalars if they ended up being references.tie my $string 'Set::Avoid', not => 'this'; $string = "This is how you do it"; print $string; #T ow you do"
Cheers - L~R
|
---|
In Section
Seekers of Perl Wisdom