有人可以幫我用perl一個班輪來獲得以下內容嗎?它必須在perl中。perl一行腳本得到最後一條記錄的路徑
drwxr-x--- - abc_grid abc_fltr 0 2012-02-05 23:24 /samples/abc/accounts/filtered/20120204
drwxr-x--- - abc_grid abc_fltr 0 2012-02-12 14:31 /samples/abc/accounts/filtered/20120211
drwxr-x--- - abc_grid abc_fltr 0 2012-02-19 14:31 /samples/abc/accounts/filtered/20120218
drwxr-x--- - abc_grid abc_fltr 0 2012-02-29 00:24 /samples/abc/accounts/filtered/20120225
drwxr-x--- - abc_grid abc_fltr 0 2012-03-05 11:36 /samples/abc/accounts/filtered/20120303
我想要最後一條記錄和路徑。
/samples/abc/accounts/filtered/20120303
解析來自'ls'輸出小於理想。如果您詢問您的主要問題,而不是解決方案的問題,我相信您可以得到更好的答案。 – TLP 2012-03-10 04:47:13
相關:http://stackoverflow.com/questions/8883091/perl-use-split-or-regular-expression-to-get-directory-names-from-text-file – daxim 2012-03-10 10:10:44