Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi
I'm using cgi.pm carp to print out compiler warnings. I'm running a script which processes information on various webpages. Sometimes when my program runs I start getting warning messages relating to cookies.pm. I'm not sure yet why this is. How might I terminate my program once carp makes a warning? The reason I need to do this is that if I re-run the script it will probably run the second time with no warnings, and fill my database with valid data.
Thanks.

Replies are listed 'Best First'.
Re: die on Carp warning
by PodMaster (Abbot) on Dec 28, 2004 at 13:25 UTC
    One way
    use warnings FATAL => 'all';
    you can (should) perldoc or search (or super search) for more info.

    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.