in reply to Re^3: next if attempt
in thread next if attempt
That reverse sort isn't necessary (unless I'm missing something). Instead, sort it in the reverse order in the first place:
my @stopwords= qw/ car pet carpet /; my $stopmatch= join '|' => map { '\b' . $_[1] . '\b' } sort { $b->[0] <=> $a->[0] } ## No reverse here map { [length $_, $_] } @stopwords;
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: next if attempt
by particle (Vicar) on Jul 16, 2003 at 15:03 UTC |