perl-diddler has asked for the wisdom of the Perl Monks concerning the following question:
# # note: may need to install "mem" ("cpan -i mem") # use strict; use warnings; ###################################################################### +########## { package Fields; use strict; use warnings; use mem; our (@flds, @EXPORT); @EXPORT=qw(@flds); use Exporter 'import'; } ###################################################################### +########## package main; use strict; use warnings; use Fields; my $nfld = scalar @flds;
I get error:
If I put qw(@flds) after the use Fields, I get:> perl t02-array.t Global symbol "@flds" requires explicit package name at t02-array.t li +ne 19. Execution of t02-array.t aborted due to compilation errors.
I think I'm missing something obvious.... :-(."@flds" is not exported by the Fields module
Thanks...
-Linda
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why is @flds not imported?
by ikegami (Patriarch) on Sep 24, 2017 at 23:14 UTC | |
by LanX (Saint) on Sep 25, 2017 at 01:33 UTC | |
by perl-diddler (Chaplain) on Sep 25, 2017 at 02:46 UTC | |
by LanX (Saint) on Sep 25, 2017 at 09:01 UTC | |
by perl-diddler (Chaplain) on Sep 26, 2017 at 23:32 UTC | |
by perl-diddler (Chaplain) on Sep 25, 2017 at 00:08 UTC | |
by LanX (Saint) on Sep 25, 2017 at 01:36 UTC | |
by perl-diddler (Chaplain) on Sep 25, 2017 at 03:05 UTC | |
|
Re: Why is @flds not imported?
by Anonymous Monk on Sep 24, 2017 at 22:03 UTC | |
by perl-diddler (Chaplain) on Sep 24, 2017 at 23:26 UTC | |
|
Re: Why is @flds not imported?
by huck (Prior) on Sep 24, 2017 at 22:00 UTC | |
by ikegami (Patriarch) on Sep 24, 2017 at 23:23 UTC | |
by Anonymous Monk on Sep 24, 2017 at 22:08 UTC |