http://www.perlmonks.org?node_id=265238


in reply to Re: VIM syntax highlighting in test scripts
in thread Editing features for advanced users

Or, if you have filetype autodetection turned on, you can use:

    autocmd BufRead *.t set filetype=perl

This will trigger the FileType event which is used to load syntax files, etc. See :help filetype for details.