in reply to open windows explorer and select file for processing
Here's another idea: If you want any file to be the STDIN for a particular Perl Script on your computer, you could do this: Create a file named MyScript.pl that takes some data from STDIN and does something with it. Then create a file called X.BAT that executes your script like so:
X.BAT takes an argument. So, now you open REGEDIT in Windows. Open HKEY_CLASSES_ROOT .. then under that heading, find "txtfile" Under the txtfile heading, look for "shell," and under the "shell" heading, look for print, then command and change the default value to: C:\BIN\PERL\X.BAT "%1"@ECHO OFF C:\BIN\PERL\TINYPERL -I C:\BIN\PERL\LIB C:\BIN\PERL\MYSCRIPT.PL < "%1" ECHO. PAUSE
What this does is it allows you to right-click on any text file in Windows Explorer, and when the context menu comes up, you can select Print, and instead of printing the text file, it will feed it to your Perl script through STDIN. ;)
|
|---|