Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: global variables defined in an external file

by choroba (Chancellor)
on May 06, 2013 at 15:58 UTC ( #1032339=note: print w/replies, xml ) Need Help??


in reply to Re: global variables defined in an external file
in thread global variables defined in an external file

It is the ohter way round:

Def.pm:

package Def; use warnings; use strict; use Exporter 'import'; our @EXPORT = qw/$sc @ar %ha/; our $sc = 'All'; our @ar = qw/the variables/; our %ha = (exported => ' succesfully.'); __PACKAGE__
The script:
#!/usr/bin/perl use warnings; use strict; use Def; print "$sc @ar ", %ha;
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1032339]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2017-04-30 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (535 votes). Check out past polls.