in reply to OO and sorting
package SORT; use X; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(sorted); sub by_id { $a->id <=> $b->id; } sub sorted { sort by_id @_ } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: OO and sorting
by artist (Parson) on Jul 26, 2001 at 01:46 UTC |