Use of uninitialized value in string eq at 1038612.pl line 21, line 4. Use of uninitialized value in string eq at 1038612.pl line 21, line 4. Use of uninitialized value in subtraction (-) at 1038612.pl line 21, line 4. Use of uninitialized value in subtraction (-) at 1038612.pl line 21, line 4.^C #### $ perl -d 1038612.pl Loading DB routines from perl5db.pl version 1.32 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(1038612.pl:4): open (FILE, "ip.txt") || die "can't: $!"; DB<1> n main::(1038612.pl:6): my @lines=(); DB<1> main::(1038612.pl:7): my @l1=(); DB<1> main::(1038612.pl:8): my @l2=(); DB<1> main::(1038612.pl:9): @lines=; DB<1> main::(1038612.pl:10): my %hash=(); DB<1> #### DB<1> x @lines 0 'ID1 ch1 70 mir abc xyz ch2 2050 ' 1 'ID2 ch1 90 mir abc xyz ch2 4000 ' 2 'ID3 ch1 100 mir abc xyz ch2 2045 ' 3 'ID4 ch1 120 mir abc xyz ch2 2025 #### DB<2> n main::(1038612.pl:11): my $i=0; DB<2> n main::(1038612.pl:12): my $j=$i+1; DB<2> n main::(1038612.pl:13): my @arr1=(); DB<2> n main::(1038612.pl:14): my @arr2=(); DB<2> main::(1038612.pl:15): my @arr3=(); DB<2> main::(1038612.pl:16): while($j <= $#lines) main::(1038612.pl:17): { DB<2> main::(1038612.pl:19): @l1=split(/\t/,"$lines[$i]"); DB<2> main::(1038612.pl:20): @l2=split(/\t/,"$lines[$j]"); DB<2> main::(1038612.pl:21): if(abs($l2[3]-$l1[3]) <= 500 && $l1[6] eq $l2[6]) main::(1038612.pl:22): { DB<2> #### DB<2> x @l1 0 'ID1 ch1 70 mir abc xyz ch2 2050 ' DB<3> x @l2 0 'ID2 ch1 90 mir abc xyz ch2 4000 ' #### DB<5> x @l1 0 'ID1' 1 'ch1' 2 70 3 'mir' 4 'abc' 5 'xyz' 6 'ch2' 7 2050 DB<6> x @l2 0 'ID2' 1 'ch1' 2 90 3 'mir' 4 'abc' 5 'xyz' 6 'ch2' 7 4000 #### DB<7> n Argument "mir" isn't numeric in subtraction (-) at 1038612.pl line 21, line 4. at 1038612.pl line 21 Argument "mir" isn't numeric in subtraction (-) at 1038612.pl line 21, line 4. at 1038612.pl line 21 main::(1038612.pl:23): $hash{$lines[$j]}=1; #### DB<7> l 21 21: if(abs($l2[3]-$l1[3]) <= 500 && $l1[6] eq $l2[6]) DB<9> x $l2[3], $l1[3] 0 'mir' 1 'mir' #### DB<1> main::(1038612.pl:21): if(abs($l2[2]-$l1[2]) <= 500 && $l1[5] eq $l2[5]) main::(1038612.pl:22): { DB<1> main::(1038612.pl:23): $hash{$lines[$j]}=1; DB<1> main::(1038612.pl:24): if(!exists $hash{$lines[$i]}) main::(1038612.pl:25): { DB<1> main::(1038612.pl:26): $hash{$lines[$i]}=1; DB<1> x %hash 0 "ID2\cIch1\cI90\cImir\cIabc\cIxyz\cIch2\cI4000\cJ" 1 1 #### DB<2> n main::(1038612.pl:27): push(@arr1,$l1[3]); DB<2> main::(1038612.pl:28): push(@arr2,$l1[7]); DB<2> main::(1038612.pl:29): push(@arr3,$lines[$i]); DB<2> main::(1038612.pl:34): push(@arr1,$l2[3]); DB<2> main::(1038612.pl:35): push(@arr2,$l2[7]); DB<2> main::(1038612.pl:36): push(@arr3,$lines[$j]) DB<2> main::(1038612.pl:19): @l1=split(/\t/,"$lines[$i]"); DB<2> #### push(@arr1,$l1[3]); push(@arr2,$l1[7]); push(@arr3,$lines[$i]); print "first item: $arr1[0], second item: $arr2[0], third item: $arr3[0]\n"; #### push @arr, [ $l1[3], $l1[7], $lines[$i] ]; print "first item: $arr[0][0], second item: $arr[0][1], third item: $arr[0][2]\n"; #### # swap items 1 and 3 my $temp=$arr1[1]; $arr1[1]=$arr1[3]; $arr1[3]=$temp; $temp=$arr2[1]; $arr2[1]=$arr2[3]; $arr2[3]=$temp; $temp=$arr3[1]; $arr3[1]=$arr3[3]; $arr3[3]=$temp; #### # swap items 1 and 3 my $temp=$arr[1]; $arr[1]=$arr[3]; $arr[3]=$temp; #### # swap items 1 and 3 ($arr[1], $arr[3]) = ($arr[3], $arr[1]);