Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: making my script work with vi

by Paladin (Priest)
on Jul 15, 2004 at 18:13 UTC ( #374764=note: print w/ replies, xml ) Need Help??

in reply to making my script work with vi

When you use ! with vi, it sends the text to the program on STDIN, and replaces it with whatever the program outputs on STDOUT. Try something like this:

#!/usr/bin/perl -w use strict; while (<STDIN>) { chomp; if ( ! -e ) { print "#$_\n"; } else { print "$_\n"; } }

Comment on Re: making my script work with vi
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://374764]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2015-11-26 03:40 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (696 votes), past polls