in reply to Random 1-1 mapping
Since an array has the factorial of its element count possible orders, your $input must have that range to obtain a 1-1 relation. Are you sure that so stringent a requirement is needed?
Check out List::Util::shuffle(). It may be good enough for what you want.
You won't want to keep C++ comments in your perl, and prototypes are usually not desirable. See perltrap.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Random 1-1 mapping
by tomazos (Deacon) on May 28, 2006 at 18:37 UTC |