... unless( is_filehandle( $arg ) { open $arg, '...', $arg or die $!; } ...