[0] Perl> sub pin{ sprintf '%04d', rand 10000 };; [0] Perl> $h{ pin() }++ for 1 .. 1e6;; [0] Perl> print +( 10000 == grep{ length() == 4 } keys %h ) ? 'OK' : ' +not OK';; OK
In reply to Re: Testing Random Code
by BrowserUk
in thread Testing Random Code
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |