This doesn't do the same as the original. When fed "The quick brown fox jumps over the lazy dog" it returns "quick brown quick brown quick brown quick brown" rather than the "quick brown" of the original.
I also found it strange that you return @unique under one condition, and $str under another...
And I assume you meant the third argument to split rather than shift?
Tony
In reply to Re: Re (tilly) 1: Unique-Character Substring
by salvadors
in thread Unique-Character Substring
by japhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |