Yes, but not for reasons you may think :)
The proper way to determine the directory where your file resides is using File::Spec->dirname( File::Spec->rel2abs(__FILE__))(dirname not official part of File::Spec, get it from here).
chdir would not affect sub flatFile because it uses an absolute path.
MJDsays "you can't just make shit up and expect the computer to know what you mean, retardo!"