in reply to multiple packages in one file
package Foo; $a = 1; package main; print "foo\n" if defined %Foo::; print "bar\n" if defined %Bar::;
Note that the symbol table won't be defined until you put a symbol in it; a mere package declaration doesn't seem to do it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: multiple package in one file
by jeanluca (Deacon) on Mar 12, 2006 at 11:23 UTC | |
by friedo (Prior) on Mar 12, 2006 at 11:49 UTC | |
by jeanluca (Deacon) on Mar 12, 2006 at 12:17 UTC |