Put the above in a file, make it executable, and call it within vi as :1,17!script and it adds numbers to the lines you selected. Should be simple to go from there to whatever you want perl to do to those lines.#!/usr/bin/perl print ++$i, " $_" for <>;
The line you select in vi will be fed to your script on STDIN and vi will replace those lines with whatever your script outputs.
In reply to Re: making perl interactive with VI
by Paladin
in thread making perl interactive with VI
by NovMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |