- for (reverse @in) {
- my @line = split /\^/ ;
- push @out, print_item(\@line);
-
+ for (sort {$a cmp $b } @in) {
+ push @out, [ split /\^/ ]
+ }
+
+ return @out;
+}
+
+sub print
+{
+ my @out;
+
+ my @in = search(@_);
+ for (@in) {
+ push @out, print_item($_);