OK, the problem was that I was experimenting with a class variables and made $file a class variables in the File::Sections module. So I think when a new File object got created, it was stomping on the previous value of the File::Sections class variable. Change $file into an attribute of File::Sections solved the problem.
$PM = "Perl Monk's";
$MC = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar Parson";
$nysus = $PM . ' ' . $MC;
Click here if you love Perl Monks
In reply to [SOLVED] Re: Creation of object having weird side effect on my code
by nysus
in thread [SOLVED]: Creation of object having weird side effect on my code
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |