Text::LTSV::Liner - Line filter of LTSV text
use Text::LTSV::Liner;
my $liner = Text::LTSV::Liner->new( key => \@keys );
while(<>) {
$liner->run($_);
}
Labeled Tab-separated Values (LTSV) format is a variant of Tab-separated Values (TSV). (cf: http://ltsv.org/) This module simply filters text whose format is LTSV by specified keys.
Constructor. You can specify some options to filter lines.
-
key
You can choose keys as array reference which you want to see in filtered output.
-
no-color
If you prefer no-colorized output, specify this option.
-
no-key
If you don't need to see keys in the output, specify this option. Then you'll see values only in the output.
Process lines and print output to STDOUT.
my $liner = Text::LTSV::Liner->new( key => \@keys );
for my $line (@lines) {
my $parsed = $liner->parse($line);
}
This method is convinent if you want to use the filtered output in your codes.
IKEDA Kiyoshi yasutake.kiyoshi@gmail.com
Copyright (C) 2013-2017 IKEDA Kiyoshi.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. That means either (a) the GNU General Public License or (b) the Artistic License.