Last active
December 4, 2015 01:11
-
-
Save tomcha/284107ef182a60cf77ac to your computer and use it in GitHub Desktop.
43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use DDP{deparse => 1 }; | |
my @num; | |
@num = (1..1000); | |
my @rev_num = reverse @num; | |
# 文字順でソートの時 | |
my @sort_num = sort @rev_num; | |
# 数値順でソートの時 | |
my @sort_num = sort{$a <=> $b }@rev_num; | |
# 以降の問に使用するのは、"数値順でソート"を利用して下さい。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment