I’ve been trying to replace BerkeleyDB module in some old Perl with DB_File ties. Reading the DB_File documentation on CPAN is helpful, but not complete. It mentions some flags to use for put, tie, etc and I’m not sure what they mean. R_CURSOR is one of those.
Specifically, if I use put with R_CURSOR, what does that mean?
Try
man dbopenfor the C level API which describes these flags, asDB_fileis really a very thin wrapper around that.The meaning of this flag differs according to which method you use it on, when used with
putthis means that a value is replaced (rather than added before or after) and needs to be used after an existing search, i.e., after using theseqfunction at the C level.