Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我有一个文件。假设它看起来像这样(实际上更长):
1234 2134 3124 4123
改组该文件中的行的最佳方法是什么?
#!/usr/bin/env perl use strict; use warnings; use List::Util qw/shuffle/; my @arr = shuffle <>; print @arr;
用法 :
./script file.txt