I guess I wasn't clear in my post. Now that I read it again I see my mistake. So let me give a more detailed explanation. What I am trying to do is to parse through an html file and create objects (am using the moose module for class creation).
if(...something...) { $n_DT[$count] = DT->new; if($line =~ m/>(.*)</) { $n_DT[$count]->{'ID'} = $1; } ... } elsif(..something else)...) { $r_DT[$count_1] = r_DT->new; if($line =~ m/>(.*)</) { $r_DT[$count_1]->{'ID'} = $1; ... }
The variables n_DT and r_DT are arrays of objects which I want to use/share between the two scripts. I am also saving the two arrays in text files. So I could possibly read the files again to create my list, but I was wondering if there was another, more efficient, way of doing this. Hope this clears my question.
In reply to Re: Destructors and global variables
by perl_noob_101
in thread Destructors and global variables
by perl_noob_101
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |