in reply to RE: Re: How can I improve this?
in thread How can I improve this?
Well, since everyone is posting their permutors, here's mine:
sub permute { my $last = pop @_; unless (@_) { return @$last; } return map { my $left = $_; map "$left$_", @$last } permute(@_); }
-- Randal L. Schwartz, Perl hacker
|
---|
Replies are listed 'Best First'. | |
---|---|
Drool
by gryng (Hermit) on Jul 25, 2000 at 17:01 UTC | |
Re: My permutor
by Anonymous Monk on Oct 03, 2004 at 18:45 UTC |
In Section
Seekers of Perl Wisdom