#Actually is a subroutine which is a part of my other program: sub parseGeneEntry { ##purpose of this function is to return everything from the second tab onwards (these are the genes) $genesList = $_[0]; #print $genesList."\n"; #print "STARTING PARSING \n"; @genes; @genes = split(/\t/,$genesList); shift(@genes); ##removes first entry of array #print $#genes." "; ##for debugging only shift(@genes); #print $#genes." "; #@genes; $toReturn = ""; $counter = 0; foreach $element(@genes){ if ($counter == 0){ $toReturn = $toReturn.$element; $counter++; } else{ $toReturn = $toReturn."\t".$element; } } #$toReturn = $toReturn."\n"; #print length($toReturn)." ".$toReturn."\n\n"; return($toReturn); }