in reply to read/write data in using CGI

Why? Your code doesn't hint at what you are trying to achieve overall and the answer you want depends on just what you want to do.

An answer may be that a normal CGI application accepts input on stdin and spits output to stdout so one approach would be to simply redirect stdin and stdio to your files. That would work fine for testing some CGI code you've written or preparing dynamic HTML offline, but maybe you have a different reason for doing this?

Perl is the programming world's equivalent of English

Replies are listed 'Best First'.
Re^2: read/write data in using CGI
by sauravrout (Novice) on May 29, 2014 at 12:08 UTC
    I want the current file content to be shown up in the textarea, so that I can change it and on submit it should write the updated stuffs in the same file. I believe i can't do it using stdin/stdout.