Thank you for the reply, but that wasn't what I wanted. Let me explain better:

What I really want is a program that grabs variables such as - $name="something..." in another file ( for ex: data.inf ) and use it at the same time. Itīs like getting info from a cookie but in this case it's not a cookie, it's a file.

Thank you very much. That solved the problem. I have just one question. What if I wanted to get the file in another site. For ex: my CGI is in "www.site1.com" and I want to open the file.pl in the site "www.site2.com". Is it possible or the only way to work is getting the file inside the same server?

Files that need to be "required" need to be in the same server path. For example, if your complete server path is:

/home/perlarchive/www/

you can require any files within /home/perlarchive and /home/perlarchive/www

The alternative is if you have both site1.com and site2.com on the same physical server, and you have root access on that server, you can upload the file(s) you want to share with the entire server in your Perl modules directory.

Yet another more extreme alternative is to ftp the "shared" file to one or more domains that need it. You can automate this process if you wish by writing a program that uses the Net::FTP and is invoked by cron. This is a much more complex solution, but it'll work.

Just in case you were concerned about learning how to use yet another Perl module, here's my "cut and paste" version of using Net::FTP -- you'll just need to edit the variables, copy and paste it into your program, and that's that for that.

################################### # Now, variables are defined, you # can pretty much just copy and # paste the following into your # program -- you can comment out # the confirmation messages if # you want.