in reply to Re: problem referencing global variable in self-written module
in thread problem referencing global variable in self-written module
Here's the code from Fleece.pm:#!perl; use warnings; use strict; use Fleece qw( $fleece ); my $BNAME = 'Mary'; my $ANIMAL = 'lamb'; print "$BNAME had a little $ANIMAL, little $ANIMAL, little $ANIMAL,\n" +; print "$BNAME had a little $ANIMAL,\n"; print "Its fleece was $Fleece::color\n";
Do you have any idea what my coding error may be?package Fleece; use strict; use warnings; our $color = "white as snow.\n"; 1;
|
|---|