Using strict and warnings in embedded perl

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

" Hello,
" Where do messages from "use strict; use warnings;" in
" embedded perl code go to?  Specifically, how can I see
" such messages from the perl embedded in the VIM editor?
" Similar question for messages from syntax errors.  Here's
" sample code for VIM's perl that runs correctly with "my"
" but fails silently when the "my" is removed.  Also, it
" fails silently when a syntax error (such as missing ";")
" is introduced.
" Thanks,
" --Suresh
perl << EOMessage

# my $foo = 1;     # OK
  my $foo = 1;     # NOT-ok because it is NOT STRICT

my $file ='the_file';

open (OUT, ">>$file") or die("Unable to open $file for writing: $!\n");
   print OUT $foo;
close OUT;

VIM::Msg("Done! -- won't be seen with missing 'my' or syntax errors!");


Site Timeline