Of couse I can write a sub, but I need to do it nice, something like:foreach ( sort { $scores{$b} <=> $scores{$a} } keys %scores )
I am making it up of course, just to explain what I want.$expr = (CONDITION) ? "$scores{$b} <=> $scores{$a}" : $scores{$a} <=> +$scores{$b}
In reply to Store operation in a variable by vit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |