Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Problems with using strict

by pfaut (Priest)
on Apr 19, 2003 at 15:23 UTC ( #251671=note: print w/replies, xml ) Need Help??


in reply to Problems with using strict

Get rid of the eval block and replace it with use Country. Other posts in this thread will show you how to get the location of your module into @INC so it can be loaded with a simple 'use'. Then put the following into Country.pm.

package Country; use strict; use base 'Exporter'; our @EXPORT = qw(%country); our %country = ( af => 'afghanistan', ao => 'angola', ar => 'argentina', at => 'austria', au => 'australia', bd => 'bangladesh', be => 'belgium', bg => 'bulgaria', ); 1;

This should get rid of your errors when using strict.

See perldoc Exporter for help on using EXPORT.

90% of every Perl application is already written.
dragonchild

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://251671]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2021-04-22 18:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?