sort a database

[email protected] (Eelco Alosery) Sun, 2 Mar 2003 18:48:57 +0100
Newsgroups perl.macperl.anyperl
Message-ID <[email protected]>
Hello,

I'm having truble sorting a database.
I use this script to open and read a database:
open (DATABASE, "$data_file") || die "Can't Open $data_file";
while(<DATABASE>)
{
($groep2, $groep_id2) = split(/\|/,$_);
foreach ($groep2)
{
print <<ENDOFTEXT;
$groep2<br>
ENDOFTEXT
}
}
close(DATABASE);

The problem I have is that I want $groep2 to be display't alfabetical.
I have tested several options using the sort comand but I cant get it 
to work the way I want.

How do I do this sorting.
Thanks