Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Using strict and warnings in embedded perl

Thread Tools

Using strict and warnings in embedded perl

Suresh Govindachar
Posts: n/a
" 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!");


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie question about scope, variables, declarations of variables and option strict (as in perl) Talha Oktay Ruby 8 03-08-2006 04:11 PM
warnings in Visual studio when using swig for perl on c++ Perl Misc 2 12-18-2005 09:46 AM
Is it correct that strict and warnings will not apply to checking the code in MYCLASS? Perl Misc 1 01-06-2005 05:45 PM
use warnings; and use Warnings; give different results Ted Sung Perl Misc 1 08-30-2004 10:22 PM
strict and warnings Robin Perl Misc 5 01-21-2004 08:15 AM