in reply to Ugly ways to declare global variables?
use strict; BEGIN { package vars; no strict qw(refs); $a="main::x"; *$a = \$$a } $x = 5; print $x;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Ugly ways to declare global variables?
by Roy Johnson (Monsignor) on Apr 25, 2005 at 20:02 UTC | |
by itub (Priest) on Apr 25, 2005 at 20:15 UTC |