I know:
use Symbol;
#
sub new
{
my $class = shift;
my $this = bless {}, $class;
$this->{FILEHANDLER} = gensym;
open ($this->{FILEHANDLER},">$fileName") || die "Unable To Open file $fileName";
return $this;
}
Hello,
What kind of perl variable is a file handler? How to make a file handler to be an "instance memeber"? I have a perl class module for writing to a file - each object (insatnce of this class) write to its own file; i want any object to keep its file handler, but i dont know how to...
Hello,
In "script1.pl" I have a global object variable:
my $startup = new Startup($dir);
In "module.pm" I want to use variable $startup. I have strict declaration enabled. How to do this?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.