in reply to Multiple Package in one file with equal named variables
You'll get warnings about "masks earlier declaration", but you intend to do that.
Example code:
use strict; use warnings; package three; my @values = qw(three three three); sub show_values { print "@values\n"; } package two; my @values = qw(two two two); sub show_values { print "@values\n"; } package one; my @values = qw(one one one); sub show_values { print "@values\n"; } package main; three::show_values; two::show_values; one::show_values;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Multiple Package in one file with equal named variables
by Brutha (Friar) on Jan 30, 2006 at 07:41 UTC | |
by Roy Johnson (Monsignor) on Jan 30, 2006 at 17:06 UTC |