I have two files called html.pl and config.pl, both of which require each
other.
in html.pl, a subroutine starts like this:
my (@hits) = @_;
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits =
$db_max_hits);
&html_record;
The subroutine &html_record is contained in the other file, config.pl. I
want to make the array @hits as well as the values of $numhits and $maxhits
available to that sub. I know that it works when I "de-privatize" the
variables, i.e. remove the "my" and the parentheses from the above code.
But I don't understand enough of perl to figure out (a) whether this is a
good idea memory-, speed- & style-wise and (b) whether there might be a
different way. Note that I won't be needing the variable values anymore in
other subs in html.pl (which, er, is why they were originally declared as
private variables).
Many thanks in advance,
Birgit Kellner
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]