Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    use warnings;
    ...
    my $expr = $condition ? '$scores{$b} <=> $scores{$a}' : '$scores{$a} <
    +=> $scores{$b}';
    
    print join "\n", sort {eval $expr} keys %scores;
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    use warnings;
    ...
    };
    
    print join "\n", sort $code_ref keys %scores;