On Jun 15, 2004, at 5:48 AM, Ramprasad A Padmanabhan wrote:

I want to open a file using a perl script and change a particular
variable in it.
I think by setting the $^I variable I can open a file for read and
write, But I am not getting any examples anywhere

You CAN open a file for read and write, but don't do that here.

Open the file for reading and an output file. Copy your original over, making the change you need in passing. Then rename the file the same as the original (warning: Data Loss Step!).

Hope that helps.

James


-- 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