Varga Pavol wrote:
Hi,
Hello
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.
perldoc is your friend. If you have separate 'package's within your file, see 'use' <http://perldoc.perl.org/functions/use.html>. Otherwise, you probably want 'require' <http://perldoc.perl.org/functions/require.html> (or 'do' <http://perldoc.perl.org/functions/do.html> if you don't want your program to immediately quit if a file couldn't be included).
Or, how to use one @array or one $array_ref for more than one file.pl?
After including files, you just use those variables as you would any others.

Many thanks.
Your welcome (and I hope I helped).

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