Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: making my script work with vi

by etcshadow (Priest)
on Jul 15, 2004 at 19:59 UTC ( [id://374808] : note . print w/replies, xml ) Need Help??


in reply to making my script work with vi

STDIN -> STDOUT, just as the others said... You might consider just putting a #!/usr/bin/perl -p at the beginning of your program and thus skipping the whole while (<STDIN>) { ... } loop.

Also, you can say :%!program to mean the whole file should be filtered, instead of :1,$!program. Just a couple fewer keystrokes is all.

------------ :Wq Not an editor command: Wq