in reply to concatenating elements of an array in twos

Your problem specification unfortunately is quite ambiguous, but maybe something like this?
my %r; for(@unpairedSidBinder){ my($sid,$foo)=split(/\|/); push(@{$r{$sid}//=[]},$foo); } print(map("$_|".join(' ',@{$r{$_}})."\n",keys(%r)));

Replies are listed 'Best First'.
Re^2: concatenating elements of an array in twos
by Sandy_Bio_Perl (Beadle) on Aug 16, 2016 at 23:39 UTC

    Thank you, oh Great One! It worked

Re^2: concatenating elements of an array in twos
by Sandy_Bio_Perl (Beadle) on Aug 16, 2016 at 23:26 UTC

    Thank you, but I dont want to use a hash as I need to maintain the duplicate values of the peptides. I'll give it a go though!