I'd just like to add that the fragment
open LABS, "/software/polaris-mfcf/data/local/w.stat"
or die "Unable to open file: $!\n";
doesn't do what you expect it to, IIRC. In reality, it's saying something like:
open LABS, ("/software/polaris-mfcf/data/local/w.stat"
or die "Unable to open file: $!\n")
The
or operator bonds to the string "/software/...", not to the
open command. You'll want to do this instead
open (LABS, "/software/polaris-mfcf/data/local/w.stat")
or die "Unable to open file: $!\n";
Update: Well! I'll be hogtied: "or" != "||". I had always assume that "or" and "and" were just common language equals to their || && counterparts. I didn't know their behaviors where different.
mr.nick ...