http://qs321.pair.com?node_id=446555

Cody Pendant has asked for the wisdom of the Perl Monks concerning the following question:

I was in a situation the other day where I just wanted to keep a count between iterations of a program.

Something like the auto-increment facility of a database, and I could use a database, but it seems like overkill. I'd have a table with one column with one INT in it.

All I want to do is save 99 on a Monday, and when I run my program again on Tuesday, pick up the 99, increment it to 100 and save 100 back.

What would monks do? Lock and read a simple text file with the digits in it? Use dbmopen()? Store the number using a module?



($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print