I would think of the next two approaches:
- Binary search. For example, you could use a binary tree, or a B-tree, or anything similar, as the data structure. What it should do, if it doesn't find a key in the tree, is return the record for the next smaller value. Make sure the dates are easily sortable, for example by using the ISO-8601 combined date/time format: "20031012T132000". This setup allows for variable gaps between measurement times. I'm not sure what Perl modules are available for this means... Keywords to search for include tree, trie, heap.
- Since your times are always exactly 30 minutes apart, just convert it to epoch times, subtract some starting value, divide by 30*60 and use the resulting value as an integer array index, in a normal array.