I cannot reproduce that locally, but it still looks like a
precendence problem to me.
Try changing your open statements and stop mixing, ie, do this
open( TMP, ">$tmp" ) || die( "A grim and horrible death" );
or do it like this
open TMP, ">$tmp" or die "A grim and horrible death";
I believe the second method is considered more Perlish.
Mik
mikfire |