in reply to Re: Reg: Performance
in thread Reg: Performance
Thank you Salva. Now I have a code like
This gives the expected output. Could you please explain me on 'my $ac = $b{$readID} || [];' Thank you once again and for all the Monks.my %b; while (DUMP_B) { chomp; my ($id, $ac) = split /\|/, $_; push @{$b{$id}}, $ac; } my $readID; while(defined($readID = DUMP_A)){ #chomp; $readID =~ s!\s+!!g; my $ac = $b{$readID} || []; #print "$readID: ", join(', ', @$ac), "\n"; my $arrSize = scalar @$ac; if($arrSize > 0 ){ for (my $i = 0; $i < $arrSsize ; $i++) { print OUTPUT "$readID|@$ac[$i] \n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Reg: Performance
by salva (Canon) on Oct 29, 2010 at 08:14 UTC | |
by sivaraman (Initiate) on Oct 29, 2010 at 12:57 UTC |