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?
I just read book from OReilly - Learning perl and some chapters about
Intermediate perl, but I am little bit confused with objects, packages and
probably more ... :-(
Many thanks.
Hello ,
Hope this Small example give you some idea.....
$cat file1.pl
#!/usr/bin/perl
$name="prabu";
$cat file2.pl
#!/usr/bin/perl
require "file1.pl";
print $name."\n";
$ perl file2.pl
prabu
--
Prabu.M.A
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>