sort { $hash{$a} <=> $hash{$b} || $a cmp $b }
I was sure that whatever written inside a BEGIN statement is hapannig before everything else, so I'm not sure why my first attempt did't wok
So you thought that the Perl code in a BEGIN block would be run by the perl interpreter before the perl interpreter was initialized? Surely it is not hard to see why that is not the case.
- tye
In reply to Re^6: setting PERL_PERTURB_KEYS & PERL_HASH_SEED in a perl file (sort)
by tye
in thread setting PERL_PERTURB_KEYS & PERL_HASH_SEED in a perl file
by gravid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |