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