Thanks a lot!!
I guessed that loading the complete file into a variable will be bad practice...thanks for pointing out the better method.
I got this idiom
my $lines = do { local $/; <STATFILE> }; from perlfaq5 but I confess that I did not understand how it works.
I just had a vague idea that for using multi-line regexp, there should be multiple lines in the variable. But I am curious to know how it works, especially about "do" and "local".
And also thanks for the tipoff on <DATA> :)