Sounds like you need to stick my before
every variable.
when you are using strict (which you always
should), variables must be declared this
way.
<pedant>
Well, that's not strictly true. When using
strict you must either pre-declare variables
or use their fully qualified names.
You can pre-declare lexical vaiables using my
or package variables using use vars. You can also
use our if you're using Perl 5.6 or later.
You can use package variables without
pre-declaring them by giving them a fully-qualified name,
e.g. $main::scalar, @main::array or
%main::hash. These can also be abbreviated to
$::scalar, @::array and%::hash.
</pedant>
--
<http://www.dave.org.uk>
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
|