File::Magic is a more perlish way of finding a file's type. If you use the MIME version of this from File::MimeInfo::Magic, you can probably just see if the MIME type matches m|^text/|.
Update: As davido says, File::Type may work too. It claims to solve many bugs in the two modules I suggested.