in reply to Destructors and global variables
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Destructors and global variables
by ikegami (Patriarch) on Jun 11, 2011 at 04:03 UTC |