in reply to Re^5: Edit in place (part2)
in thread Edit in place (part2)
#!/usr/bin/perl -w use strict; use diagnostics; mysub(); sub mysub{ my $vari = hereistheip(); print "This is the IP you entered --> $vari\n"; local $^I = ".bak"; @ARGV = "stuff"; while (<>) { s/FOO/$vari/i; print; } } sub hereistheip{ print "Enter a valid server IP \n --> "; my $myip = <>; chomp $myip; return $myip; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Edit in place (part2)
by Corion (Patriarch) on May 02, 2006 at 15:32 UTC | |
by jzb (Hermit) on May 02, 2006 at 15:38 UTC |