in reply to Need help with objects

add:
use strict; use warnings;
to your code (both the module - under the package declaration - and the script), and remove the shebang line (#!/...) from the module (not needed). Then you m ight get a better idea what the error is.

Replies are listed 'Best First'.
Re^2: Need help with objects
by Fletch (Bishop) on Nov 16, 2006 at 14:40 UTC

    While a #! isn't needed, it's often useful to have as many utilities (e.g. file) and editors (vim, the various emacsen) will key off it to determine the file's type. Granted some of these may use the file's extension as well (the editors will) if the shebang is missing, but it really doesn't hurt anything to have it there.