Rosetta Code/Rank languages by number of users: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: use better variable names to make it easier to follow logic) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: remove unnecessary stray scalar dereference) |
||
Line 59: | Line 59: | ||
sub display ($count, $which) { |
sub display ($count, $which) { |
||
if $last != |
if $last != $count { $last = $count; $rank = $lang; $tie = ' ' } else { $tie = 'T' }; |
||
sprintf "#%3d Rank: %2d %s with %-4s users: %s", $lang++, $rank, $tie, $count, $which; |
sprintf "#%3d Rank: %2d %s with %-4s users: %s", $lang++, $rank, $tie, $count, $which; |
||
} |
} |