Using strict and warnings in embedded perl

Discussion in 'Perl Misc' started by Suresh Govindachar, Jul 14, 2004.

  1. " 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!");

    EOMessage
     
    Suresh Govindachar, Jul 14, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robin

    strict and warnings

    Robin, Jan 21, 2004, in forum: Perl Misc
    Replies:
    5
    Views:
    144
    Jonathan Stowe
    Jan 21, 2004
  2. Ted Sung
    Replies:
    1
    Views:
    334
    Sherm Pendley
    Aug 30, 2004
  3. Replies:
    1
    Views:
    108
    Paul Lalli
    Jan 6, 2005
  4. Marius Gavrilescu

    Re: use strict; use warnings;

    Marius Gavrilescu, Feb 24, 2014, in forum: Perl Misc
    Replies:
    152
    Views:
    595
    $Bill
    Mar 11, 2014
  5. Kaz Kylheku

    Re: use strict; use warnings;

    Kaz Kylheku, Feb 24, 2014, in forum: Perl Misc
    Replies:
    0
    Views:
    76
    Kaz Kylheku
    Feb 24, 2014
Loading...

Share This Page