[英]Is there a module that prints a list like `ls -C`?
Is there a module that prints (or helps me printing) a list whose elements are strings (scalars) in a ls -C
fashion? 是否有一个以
ls -C
方式打印(或帮助我打印)其元素为字符串(标量)的列表的模块?
Something like the following imaginary program: 类似于以下虚构程序:
use strict; use warnings;
use Unknown::Module;
my $ls = new Unknown::Module (columns => 3);
$ls -> print_ls_C qw(abc def ghi jklmnop q rst uv wxy z);
The output should then be something like 输出应该是这样的
abc jklmnop uv
def q wxy
ghi rst z
use Perl6::Form;
my $cols = shift || 3;
my @list = qw(abc def ghi jklmnop q rst uv wxy z);
print form q/ {:[{*}[:} / x $cols, ( \@list ) x $cols ;;;
__END__
abc jklmnop uv
def q wxy
ghi rst z
This is from example demo_columns , see more examples in https://metacpan.org/source/DCONWAY/Perl6-Form-0.04/demo 这是来自demo_columns示例,请参见https://metacpan.org/source/DCONWAY/Perl6-Form-0.04/demo中的更多示例
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.