in reply to What does "requires explicit package name" mean?

Change each of the blocks similar to the following in this manner:
my @allquestions; if ($type =~ m/q/i) { # ** CHECKS FOR QUESTION LINE & PRINTS QUESTI +ON print "<B>$value</B><BR>"; @allquestions = (@allquestions, $value); }
In addition, make the following change:
@allquestions = (@allquestions, $value); # Should be ... push @allquestions, $value;

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Replies are listed 'Best First'.
Re^2: What is an
by Anonymous Monk on May 04, 2005 at 06:11 UTC
    Hi Dragonchild, That was for arrays, how do we do it for simple variables. my $DAEMON_LOG="$IPMAN_HOME/data/daemon_log.txt"; my $DAEMON_ERROR_LOG ="$IPMAN_HOME/data/daemon_error_log.txt"; I have used my before any thing expect the packag declaration & I am getting the error Global symbol "$DAEMON_LOG" requires explicit package name at ipmand line 348. Global symbol "$DAEMON_LOG" requires explicit package name at ipmand line 349. Global symbol "$DAEMON_LOG" requires explicit package name at ipmand line 350. Global symbol "$DAEMON_ERROR_LOG" requires explicit package name at ipmand line 354. Global symbol "$DAEMON_ERROR_LOG" requires explicit package name at ipmand line 355. Global symbol "$DAEMON_ERROR_LOG" requires explicit package name at ipmand line 356.