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

hi, Using PPM, I installed
Math::Random::MT::Auto
and when I run my Perl code, it pops up a window saying Perl command line interpreter is not working.. when I hit on View details, it shows the below....
Files that help describe the problem: C:\Users\ba\AppData\Local\Temp\WER9C40.tmp.WERInternalMetadata.xml C:\Users\ba\AppData\Local\Temp\WERDE40.tmp.appcompat.txt C:\Users\ba\AppData\Local\Temp\WERDE50.tmp.mdmp
when I go into the Temp folder, I don't see the above 3 files. I commented out the code that uses
use Math::Random::MT::Auto::Range;
and my perl code works....how do I fix this issue. I need to generate random numbers....thx!

Replies are listed 'Best First'.
Re: Perl command line interpreter not working
by GrandFather (Saint) on Oct 15, 2011 at 01:43 UTC

    What you are seeing is a crash (invalid memory access or some such) when your script is running. 'it' is actually Windows catching and reporting the crash and is nothing to do with the Perl interpreter. Most likely the fault is in Math::Random::MT::Auto::Range. Please show us a short sample script that gives the error so that we can confirm it. You should also send in a bug report using https://rt.cpan.org/Public/Bug/Report.html?Queue=Math-Random-MT-Auto.

    To keep on working use Math::Random::MT instead and write wrapper subs as required to provide the range management the other module gives.

    True laziness is hard work
Re: Perl command line interpreter not working
by Khen1950fx (Canon) on Oct 15, 2011 at 01:41 UTC
    You didn't post your code. How do you expect anybody to help you without it? Without seeing your code, I'd guess that you have a mode problem. When you made the files, you should have used
    binmode( $fh, ":utf8");

      It's a guess, but most likely it's a wrong un. Getting the file read mode wrong is unlikely to cause a crash that would trigger Window's error reporting.

      Although the OP didn't give us enough code to reproduce the problem, he did give us enough information to provide some pointers and there was nothing there that indicated file I/O related problems.

      True laziness is hard work
        I don't believe this is an I/O related problem. here's the relevant code
        use Math::Random::MT::Auto::Range; my $rng = Math::Random::MT::Auto::Range->new(LO => 10000, HI => 999 +99,TYPE => 'INTEGER'); my $A = $rng->rrand(); my $B = $rng->rrand(); my $str = "$A$B";
        of course, when I comment it out, my file compiles, so I know this is the cause of the problem.