PerlPowerTools

 view release on metacpan or  search on metacpan

bin/col  view on Meta::CPAN

# prepare regexes for matching linefeeds
#            any             full reverse  half reverse  half forward
my @re = qw( [7-9\x07-\x09]  ^[7\x07]$     ^[8\x08]$     ^[9\x09]$ );

# INPUT

while (<>) {
    # chop trailing characters not followed by a linefeed of any kind
    s/^(.*(?:\x0A|\e$re[0])|).*$/$1/sxo if $opt_t;

    my @chars = split m//;

    my $i;
    for ($i=0; $i<=$#chars; ++$i) {
        my $c = $chars[$i];

        if ($c eq "\x1B" or $c eq "\x0B") {
            if ($c eq "\x0B" or $chars[++$i] =~ /$re[1]/xo) {
                                                # reverse line feed
                $row -= 2 if $row >= 2;
            } elsif ($chars[$i] =~ /$re[2]/xo) { # half reverse line feed

bin/cut  view on Meta::CPAN

Use the first character of I<string> as the field delimiter character
instead of the tab character.

=item -f list

The I<list> specifies fields, delimited in the input by a single tab
character.  Output fields are separated by a single tab character.

=item -n

Do not split multi-byte characters.

=item -s

Suppresses lines with no field delimiter characters.  Unless
specified, lines with no delimiters are passed through unmodified.

=back

=head1 BUGS



( run in 1.673 second using v1.01-cache-2.11-cpan-71847e10f99 )