in reply to Re: Re: Question regarding DB_File
in thread Question regarding DB_File
If you know that the catalog numbers never have more than a certain number of digits, you can make them sortable by adding leading zeroes to numbers, like this:
Remember to keep a copy of the original key around so you can show it to your users, and they won't ever have to know what you've done.$key =~ s/(\d+)/sprintf "%03d", $1/eg;
If you don't have a guarantee about how many digits can be in a catalog number, there are clever solutions... You could, for instance, store the number of digits followed by the actual digits themselves.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Question regarding DB_File
by Stamp_Guy (Monk) on Jul 07, 2001 at 05:25 UTC |