LoginSignup
2
2

More than 5 years have passed since last update.

Perl でシュフォーツ変換

Last updated at Posted at 2013-04-15
# シュフォーツ変換 とか言うらしい。。。
my @logFiles = 
     map  { $_->[0] }              # 4) ファイル名のみ取り出す
     sort { $b->[1] <=> $a->[1] }  # 3) ファイルサイズをキーにして降順ソートする
     map  { [ $_ , -s ] }          # 2) ファイル名とファイルサイズを組みを作成
     <*.log>;                      # 1) カレントディレクトリのログファイルが対象
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2