Make vim support Perl 5.10

The new say function isn't supported by the perl.vim file that ships with vim. Nick Hibma, the maintainer, tells me it will be updated in the next version of vim. In the meantime, you can hack your local vim files by adding the following line to your ~/.vim/syntax/perl.vim file:

syn keyword perlStatementFiledesc
    \ binmode close closedir eof fileno getc
    \ lstat print printf readdir readline readpipe rewinddir
    \ say select stat tell telldir write
    \ nextgroup=perlFiledescStatementNocomma skipwhite

Even if you haven't upgraded to Perl 5.10, you can use Jim Keenan's Perl6::Say module to add the say function.

Categories:

1 Comments

Unfortunately, Perl6::Say does not support the two most common ways to print to a filehandle:


say $fh $text; # standard lexical fh ref

say {$fh} $text; # PBP style

Leave a comment

About this Entry

This page contains a single entry by Andy Lester published on December 27, 2007 1:37 PM.

Code broken by regex fixes in 5.10.0, or, why it's good to help test release candidates was the previous entry in this blog.

Update your copies of DateTime::TimeZone is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Other Perl Sites

Other Swell Blogs

  • geek2geek: An ongoing analysis of how geeks communicate, how we fail and how to fix it.