in reply to Sorting issues

Chomp just before the comparison:
my @sorted = sort{ my $one=substr($a,rindex($a,'|')); my $two=substr($b,rindex($b,'|')); chomp($one,$two); ($one <=> $two) } @database;

Update: I only answered the question of where to put a chomp in that block. See the following replies for a more in-depth analysis of the sorting problem.

--
Check out my Perlmonks Related Scripts like framechat, reputer, and xNN.

Edit: chipmunk 2001-05-26