Hello. I have 2 (probably simple) perl questions.
1. I want to store a package (or class) name in a variable. How do I do this? I want something like this:
I found you can do this with functions by doing \&functionnam e. Is there a similar way to do this for package names?
2. After I create an instance of a package, how do I remove it? If I have something like
Then how do I delete it when I am done with it? Is it ok if I just never delete it?
Thanks!
1. I want to store a package (or class) name in a variable. How do I do this? I want something like this:
Code:
@classes=("myclass","myotherclass","anotheroneofmyclasses");
foreach(@classes){new $_;}
2. After I create an instance of a package, how do I remove it? If I have something like
Code:
$myobject=new someobject;
Thanks!