I will be glad if someone can give me a guide.

I have a file
test.conf
[$ip]
name=goksie
host=$ip
directive=ask
configdir="/usr/local/etc/"

now to disable this account I just have to remove the change the value
of the ip

however, I have tried this code it does not help.

#!perl
use warnings;
use strict;
print "what is the ip to suspend\n";
our $ip = <STDIN>;
chop($ip);
my $files = "/perl/test.conf";
open my $fh, '<', $files or die "can't open the files $files: $!";
while(<$fh>){
s/host=$ip/host=$ip.old/g;
#print $_ ;
}

If i run the script, the changes could not be effected bcos the files is
a readonly file.

I will be glad if someone can put me true

goksie

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to