RE: How to put a global variable in a package, accessible to users of that package?
- From: pangj@xxxxxxxxxxx (Jeff Pang)
- Date: Fri, 31 Oct 2008 10:37:59 +0100 (CET)
Message du 31/10/08 10:25
De : "Stewart Anderson"
A : "mrstevegross" , beginners@xxxxxxxx
That was not interesting. $foo::VAR is a wrong usage on his case. See Shawn's answer.=== foo.pl ===That looks interesting. How do people use that kind of constant
package foo;
use constant VAR => "someval";
=== bar.pl ===
use foo;
print $foo::VAR;
It doesn't appear to be working; it compiles ok, but it prints
nothing. I thought it would print "someval".
assignment.
Jeff.
http://home.arcor.de/pangj/
Créez votre adresse électronique prenom.nom@xxxxxxxxxxx
1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
- Follow-Ups:
- RE: How to put a global variable in a package, accessible to users of that package?
- From: "Stewart Anderson"
- RE: How to put a global variable in a package, accessible to users of that package?
- Prev by Date: RE: How to put a global variable in a package, accessible to users of that package?
- Next by Date: Issue with references and array slice with one member !
- Previous by thread: RE: How to put a global variable in a package, accessible to users of that package?
- Next by thread: RE: How to put a global variable in a package, accessible to users of that package?
- Index(es):