in reply to I just realized that FILEHANDLES violate use strict

you can use FileHandle;, if you want to use scalars. then you'll have to follow the rules:
my $file = shift; my $F = FileHandle->new; if( defined $F ) { $F->open($file) or die "can't open file $file: $!" } # it also lets you do things like $F->autoflush; # instead of that whole select() business

~Particle ;Þ