|P is for Practical|
|( #3333=superdoc: print w/replies, xml )||Need Help??|
It works for me with vim version 6.1.320 and the code you posted.
I saved the code into a file named 'filter', set the file to be executable, and called it with the relative path on the command line. Here's the command I used in vim:
The command ':!program' just runs an external program, it doesn't filter. You have to provide a range either at the colon prompt, by visual selection, or by motion selection. When I used just the ':!./filter' command as you suggest, it waited for me to type the input to the filter program, and to send it an end-of-file character.
If you can't make the program executable, then you may need to use ':!perl program' instead. That works for me, too.
This is really a vim question from what I can tell, as the program you provided works for me the same as any other. However, your node mentions Windows, and I don't have any form of vi on any of my Windows machines at the moment. There's no way for me to tell if there's something strange going on with a platform issue here.
Christopher E. Stith
In reply to Re: How do I create a simple, perl-based text filter for Vim