Hi,
Im trying to read a file and once i have found a particular line using a
regex i want to write a line of code immediately after that line. Is it the
filehandle mode that i am using "+>" that is incorrect?. If this is wrong,
what is the easiest way to do it?
Im trying with the code below but am not sure on why i get the following
error message:
readline() on closed filehandle IPCHAINS at ./ipchains.pl line 6
_________START_____________
open(IPCHAINS,"+>>/etc/syconfig/ipchains");
while($line = <IPCHAINS>) {
print "Testing the perl script\n" if $line =~ /^-A input/;
}
close(IPCHAINS);
___________END______________
Thanks
Rob
--
Email Disclaimer can be viewed at:
http://www.netscalibur.co.uk/email.html
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]