in reply to Variable access across packages?
use strict; use warnings; package B; our $foo = 3; package main; print $B::foo, "\n";
If you don't want the $B::foo notation, have a look at Exporter
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Variable access across packages?
by shmem (Chancellor) on Nov 14, 2007 at 18:21 UTC | |
|
Re^2: Variable access across packages?
by porta (Sexton) on Nov 14, 2007 at 14:22 UTC | |
by moritz (Cardinal) on Nov 14, 2007 at 14:24 UTC | |
by tinita (Parson) on Nov 15, 2007 at 12:40 UTC |