in reply to Re: problem referencing global variable in self-written module
in thread problem referencing global variable in self-written module
#!perl; use warnings; use strict; use Fleece qw( $fleece ); my $BNAME = 'Mary'; print "$BNAME had a little lamb, little lamb, little lamb,\n"; print "$BNAME had a little lamb,\n"; print "It's fleece was $fleece.\n";
I got this error when I tried to execute the script:package Fleece; use warnings; use Exporter; our @EXPORT_OK = qw( $fleece ); our $fleece = "white as snow.\n"; 1;
Global symbol "$fleece" requires explicit package name at testuse.pl l +ine 11. Execution of testuse.pl aborted due to compilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: problem referencing global variable in self-written module
by ikegami (Patriarch) on Jun 08, 2006 at 21:21 UTC | |
by yburge (Acolyte) on Jun 09, 2006 at 20:26 UTC | |
by ikegami (Patriarch) on Jun 09, 2006 at 20:53 UTC |