예)
문자열 배열
"A 0.4 B"
"A 0.123 C"
...
두 번째 탭의 숫자 크기 순으로 정렬하고자 할 때.
Copy
@result_list
=
sort
{
my
@tempA
=
split
/
/
,
$a
;
my
@tempB
=
split
/
/
,
$b
;
$tempB[
1
]
<=>
$tempA[
1
]
}
@result_list
;
Perl
Sort
Retrieved from https://hyacinth.kr:443/moniwiki/wiki.php/Perl/정렬
last modified 2017-01-12 13:13:15