eval { require 'sys/ioctl.ph' }; $Tcl::pTk::_FE_unavailable = $@; ... if ($Tcl::pTk::_FE_unavailable) { ...