I did wonder if there was a Windows app to give me this functionality, but I can't find anything.

Yeah there is, it's called the device driver kit. :-)
http://www.microsoft.com/whdc/ddk/winddk.mspx

From what I read in your post, I have a feeling that you are not looking for a solution that simply preprocess the CSV and fire-off the dos app, but rather you are looking for something that hooks into the file open and file access. So that when your program, say, opens 'generate.pl' for read, it actually runs the perl script, and read from the text file instead. Kind of transparent to the DOS application.

So basically you want to create a device driver that hooks into the file I/O subsystem under Windows. When a process tries to open a file, it checks the extension of the file, if it matches 'pl', then it executes the perl script, generates the CSV file, and then open the CSV file instead.

So the answer is yes, it is possible. But a bit insane. :-)

Update: The Win32::Pipe module mentioned above by matija is certainly worth a try, before you diving deeper into Windows internals. But that's only half the solution, you will still need to hook into the Windows I/O subsystem somehow to trigger the execution of the Perl script.


In reply to Re: Making a perl program look like a regular file on Win32? by Roger
in thread Making a perl program look like a regular file on Win32? by SmugX

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.