in reply to Receiving warnings in browser

I'm running Perl 5.6.0 on Linux and am getting warnings in my browser when I run my Perl programs:
Um, then stop printing the warnings to your browser :)

I placed the following code in my Perl program, but it does not seem to affect external modules such as sendmail...
That's because warnings are a "lexical" pragma ({ no warnings 'all'; 'does not affect'; { use warnings; 'code here'}}).
perldoc perlrun
...
 -W   Enables all warnings regardless of "no warnings" or "$^W". See the
      perllexwarn manpage.

 -X   Disables all warnings regardless of "use warnings" or "$^W". See
      the perllexwarn manpage.


MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re^2: Receiving warnings in browser
by db2admin (Acolyte) on Jun 05, 2004 at 17:35 UTC
    Let me give some more information with regard to my problem. I moved from a web host (linux) to a dedicated linux server. On the web host, I was able to run my scripts without having warnings returned to the browser. I did have -w enabled and that was all.

    When I moved to the dedicated server, I noticed that warnings such as the "unititialized" warning started popping up on the browser with the same unchanged scripts. This makes me believe that there must be a setting somewhere that is more global to turn off warnings (such as a config file).

      ... This makes me believe that there must be a setting somewhere that is more global to turn off warnings (such as a config file).
      I see, so you have a broken server, can't help you there (STDERR is not STDOUT, but apparently your server thinks it is).

      MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
      I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
      ** The third rule of perl club is a statement of fact: pod is sexy.