Solak has asked for the wisdom of the Perl Monks concerning the following question:
And this is a script:package module1; use strict; require Exporter; use vars qw(@EXPORT_OK); our $str = "Placeholder"; @EXPORT_OK = qw($str); 1;
Output of ./script.pl is#!/usr/bin/perl -w use strict; use module1 qw($str); print $str;
Any help would be appreciated.Global symbol "$str" requires explicit package name at ./script.pl lin +e 7. Execution of ./script.pl aborted due to compilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with basic import/export variables
by GrandFather (Saint) on Sep 10, 2007 at 01:02 UTC | |
by Solak (Novice) on Sep 10, 2007 at 01:11 UTC |