Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Random 1-1 mappingby Zaxo (Archbishop) |
on May 28, 2006 at 18:10 UTC ( [id://552200]=note: print w/replies, xml ) | Need Help?? |
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,
In Section
Seekers of Perl Wisdom
|
|