M
Marcus
Hello, I'am a newbee in Perl and in Newsgroups. But I hope for some
help.
I have a array of Objekts and i want to sort these Objekts by using a
Objektmethod.
I tried this:
certainly the Objektstore ist filled with Objekts !!!
@unsortedObjektstore
@sortedObjekts = sort {$unsortedObjektstore->getNumber() <=>
$unsortedObjektstore->getNumber()} @unsortedObjektstore;
I thougt it works like an example in perldoc:
# sort numerically descending
@articles = sort {$b <=> $a} @files;
But it don't do so.
Can somebody help me?
help.
I have a array of Objekts and i want to sort these Objekts by using a
Objektmethod.
I tried this:
certainly the Objektstore ist filled with Objekts !!!
@unsortedObjektstore
@sortedObjekts = sort {$unsortedObjektstore->getNumber() <=>
$unsortedObjektstore->getNumber()} @unsortedObjektstore;
I thougt it works like an example in perldoc:
# sort numerically descending
@articles = sort {$b <=> $a} @files;
But it don't do so.
Can somebody help me?