Hi, can anyone help me out?
Code: foreach(@unsort) { ( $Sip, $Spo, $Dip, $Dpo, $Prot, $Dir ) = split( ',' ); foreach(@unsort) { if (index($_,$Sip)>-1 and $Dir==0) { $unsort[0] =~ s/$Sip//; $countout++; next; } elsif (index($_,$Sip)>-1 and $Dir==1) { $unsort[0] =~ s/$Sip//; $countin++; next; } else { next; } } if ($countout==0){$countout=1;} if ($countin==0) {$countin=1;} $TopOut{$Sip}=$countout; $TopIn{$Sip}=$countin; } The input is sth like that "51,34,55,45.0" or "34,45,123,55,0". I want to find out how often Number 55 exists. No matter on what position the 55 is. In the above example the routine will make (depending on the size of @unsort) $unsort*$unsort transitions... that is too long because my @unsort has up to 50000 Elements.. Any ideas to accomplish it faster? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/