in reply to wrong in minus

I don't know what your data looks like (you should give us a sample), but making an assumption that you used split incorrectly, try this:

@tmp1=split /\t+/, $item1;

Replies are listed 'Best First'.
Re^2: wrong in minus
by Tux (Canon) on May 10, 2018 at 17:16 UTC

    And the use strict; use warnings; advice would have given you an indication:

    $ perl -wE'my $item1="x\t\ty";my@tmp1=split(/t+\,$item1/);' Use of uninitialized value $_ in split at -e line 1. $ perl -wE'my $item1="x\t\ty";my@tmp=split(/t+/,$item1);say for@tmp' x y $ perl -wE'my $item1="x\t\ty";my@tmp=split(/\t+/,$item1);say for@tmp' x y

    Enjoy, Have FUN! H.Merijn
Re^2: wrong in minus
by yueli711 (Sexton) on May 10, 2018 at 19:09 UTC

    Thank you so much! Yes! You are correct!