I'm working in an office environment. Bunch a people scan things and need to move documents from place to place, access hardware accross the network, etc.

One of the things we have, is an old scanner/printer.. one of those four bajillion dollar chunks of mountain.. you know.. those cannon printers that scan, print, collate, make coffee, etc.
We have it set up so that when you scan, you can choose from a list of places to send to. The software is set up on this machine to read from a text file (yeah.. you see where this is going? :) ) a list of directories etc that are valid options. Everytime a user scans and selects from the list, the text file is loaded by the orinter hardware.
There are about 400 directories, they change sometimes. Some poor bastard was entering and keeping them up to date manually. So, now we have a perl script that makes the list. When something changes, the script can be re-run.
Another option is to put it on cron.. And then... What I really really like... And what this post is about - and i need opinions.. is...

I was thinking..
I want to have list.txt - which is really a perl script that spits out list.txt- you know? spits out mime type, and content.
And I was also thinking of doing this in other things.. for example, having a image.png file.. that's really a perl script, that is accessed being called by html liks <img src="image.png">, and when called, something happens- a notice is sent, the image is generated from scratch, whatever..

So I would end up with files like list.txt and image.png, whatever.doc which output that expected content... but the file itself is really a program.

Now, I know how to do this- nothing crazy. What I want to know is. Should I do this, regularly?
Is this looking for trouble? Am I potentially going to cause problems? I want to use this in websites, office networking hacks.. Is this bad juju? Am I breaking some unspoken *ix rule about being clever?
What if I die and someone else takes this job.. Would I be leaving a legacy of insanity or would this be a regular common *ix hack that someone should figure out ?


In reply to scripts posing as data files, nitch nitch or uber cool? by leocharre

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.