Perl: the Markov chain saw | |
PerlMonks |
Re: Making a perl program look like a regular file on Win32?by Roger (Parson) |
on Mar 03, 2004 at 12:11 UTC ( [id://333518]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|