C
cate
I have a large list of my vars that I would like to get out of the
way; place them at the end of the script - kinda a class thing.
Is there a way to use BEGIN some how? Something like this. I
suspect you can't, but I'm asking the pros.
use strict;
code using $var1 ...
code using $var1 ...
more code
BEGIN {
my $var1 = 'sfsdf';
my $var2 = 'sdfsdf';
}
thank you
way; place them at the end of the script - kinda a class thing.
Is there a way to use BEGIN some how? Something like this. I
suspect you can't, but I'm asking the pros.
use strict;
code using $var1 ...
code using $var1 ...
more code
BEGIN {
my $var1 = 'sfsdf';
my $var2 = 'sdfsdf';
}
thank you