| Next | Lightweight Databases | 62 |
For example:
sub uppercase_username {
my ($file, $username) = @_;
for (@$file) {
last if s/^$username:/\U$username:/;
}
}
This builds and maintains an offset table in case you visit any of the early records again
If you don't, the time spent is wasted
The first version of uppercase_username didn't have to do that
| Next | ![]() |
Copyright © 2003 M. J. Dominus |