in reply to Re: multiple package in one file
in thread multiple packages in one file

So my problems is not solved then, because I need to check if the package exists before I use it ?
Thnx
Luca

update: I see it, it works, but this doesn't seem to work:
if ( defined %A::B$type ) { }
Any suggestions ?

Replies are listed 'Best First'.
Re^3: multiple package in one file
by friedo (Prior) on Mar 12, 2006 at 11:49 UTC
    You'll need to use curlies to tell Perl that you want a variable as part of the package name.

    Try %{ 'A::B' . $type . '::' }

    Remember to include the extra '::' on the end.

      Thnx!!!!