in reply to Prevent Perl Command Line Interpreter Popup From Appearing On Perl Crash

I have no idea what you are talking about. What kind of popup? Do you get a console window with an error message (AKA "a DOS window")?

If that is indeed the case, then you might try to redirect STDOUT and/or (more likely to help) STDERR to a log file.

open STDERR, ">>logfile.log"
at the start of your script, would do that. For example.
  • Comment on Re: Prevent Perl Command Line Interpreter Popup From Appearing On Perl Crash
  • Download Code

Replies are listed 'Best First'.
Re^2: Prevent Perl Command Line Interpreter Popup From Appearing On Perl Crash
by BrowserUk (Patriarch) on Dec 06, 2006 at 17:37 UTC

    See what happens when you do

    perl -e"$x = 'x' x 1e11"

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Nothing. Not even if I change the "1e11" into "1e15".

        Try reducing the value?

        It causes a "Perl Command Line Interpreter has encountered a problem and needs to close. We are sorry for the inconvenience." popup on my system for values 1e9, 1e10 & 1e11, but not 1e12.

        For the former values I can hear the disk thrash as it attempts to free up swap space to accomodate the malloc.

        With the latter, which is bigger than my combined physical memory and reserved swap space, there is no thrashing as it knows it cannot accomodate that size. In that case, malloc() just returns null and perl quits silently.

        It's possible you have different system settings (like Control Panel->System->Advanced->Startup & Recovery->Settings or others) that affect your systems actions when these errors occur.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.