On Mon, Jun 19, 2006 at 05:02:33PM +0200, Varga Pavol wrote: > Hi, > may be very simple, but I don't understand well how to simple use (share) > varables between perl files? > I have (very) big perl script and I would like to divide it into more small > scripts to make it all more transparent. > Or, how to use one @array or one $array_ref for more than one file.pl?
To summarize what others have said: You can include the code of one Perl file in another via "use" or "require", and you can save variable data in an external file (such as a config file) that each separate Perl script parses to populate variables. You could even simply have one script call another, and get output from that other for use as variable data in the script that called it. The "best" way to do it in your case will vary, depending on what exactly you're doing with your Perl scripts. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] unix virus: If you're using a unixlike OS, please forward this to 20 others and erase your system partition. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>