So, there I was... sitting at a perl user group meeting last night and we were going over some OS admin scripts one of the members had written. He then started talking about writing yet another "mount point percent free" script, but where most scripts compare the current space utilization against one or more thresholds, he was interested in watching the growth rate of the mount points. This started me thinking about collecting used space statistics over time for all the mount points on a system, using regression to determine the "normal" growth, and then sending notifications when growth is outside the "normal" range.
You know how your mind starts to wander after working all day? When I started thinking about storing the data points, my mind went down an unexpected path -- could I write a single script which would not only contain the perl source, but would also contain the configuration information and serve as the repository for the historical trend data? (Please note: even in this strange state, I did not expect to store a "lot" of data, but rather, maybe 48 or so data points for each mount point.)
I guess all this rambling brings me to my real thoughts: For me, at least, this has become an "interesting... see what I can do" problem; has anyone else manipulated a script's source and stored changing data after the __DATA__ token?