|
|
| Do you know where your variables are? | |
| PerlMonks |
Efficient coupling/decoupling of serialized databy bronto (Priest) |
| on Jun 24, 2002 at 08:12 UTC ( #176711=perlmeditation: print w/ replies, xml ) | Need Help?? |
|
Here is another easy-to-solve problem that leads to more complex questions. A standard DNS serial has the following syntax: YYYYMMDDVV, that is: the modification date in year-month-day format (four, two and two digits, respectively) and a two-digit version number. For example, the third version of today's map should be 2002062403. Now suppose you have a script that updates your DNS maps: to update the serial your code should:
Solved this easy problem, one meditation came into my mind: having some data in this form: YYYYMMDDVV, what is the most efficient way to deserialize this data? I mean, among the many ways of doing the job:
which, in your opinion, could be the best way under several aspects (speed, memory consumption, cpu consumption, simplicity... choose your favourite :-) Ciao!
Back to
Meditations
|
|
||||||||||||||||||||||||||||||||||||