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

Good evening monks! I have an unusual question. All my perl programs be it command line or GUI all work fine on Windows XP. I have switched over to using Windows 7 and get the following error which I do believe has to do with permissions. Has anyone else experienced any of these errors? Thanks in Advanced!

Error: Can't open log at C:\PerlScript\myscript.pl line 101 <#1> <F> You tried to run a perl built with MAD support with the PERL_XMLDUMP environment variable set, but the file named by that variable could not be opened. Uncaught exception from user code: Can't open log at C:\PerlScript\myscript.pl line 101

Replies are listed 'Best First'.
Re: Windows 7
by soonix (Chancellor) on Dec 06, 2013 at 08:55 UTC
Re: Windows 7
by taint (Chaplain) on Dec 06, 2013 at 02:58 UTC
    Greetings, PilotinControl.

    While I could guess what's wrong. I would only be guessing. As I have almost nothing to go on. Based on the title of your question. As well as the contents.

    May I suggest thet the frequency, and quality of answers to questions at PerlMonks. Is directly proportionate the quality of the questions asked.

    Please have a look at How do I post a question effectively?, if you are unsure what I'm trying to say.

    Best wishes.

    --Chris

    Hey. I'm not completely useless. I can be used as a bad example.
    

      Hello Chris..below is line 101 in which the error is referring too:

      open(STDOUT, '>>', 'sbguioutput.txt') or die "Can't open log"; # Regul +ar Output open(STDERR, '>>', 'sbguierror.txt') or die "Can't open log"; # Error + Output

      My guess is file permissions? Thanks!

                My guess is file permissions?

        You wouldn't have to "guess" if you displayed the error message from the OS.
        Change your code to:

        open(STDOUT, '>>', 'sbguioutput.txt') or die "Can't open log:$!"; # +Note $! added
        FYI -MAD info from http://perldoc.perl.org/perl594delta.html#MAD

        MAD, which stands for Misc Attribute Decoration, is a still-in-development work leading to a Perl 5 to Perl 6 converter. To enable it, it's necessary to pass the argument -Dmad to Configure. The obtained perl isn't binary compatible with a regular perl 5.9.4, and has space and speed penalties; moreover not all regression tests still pass with it.

                     When in doubt, mumble; when in trouble, delegate; when in charge, ponder. -- James H. Boren

        Ugh. I really do want to help. But I'm going to need information you're not providing.

        Let's see if I can steer this in a more effective direction. :)

        You indicate you used to be on XP, but now you're on Windows 7.
        That's nice, but tell's me nothing about the Perl on XP, nor on your Windows 7.
        Did you upgrade XP to Windows 7? Did Windows upgrade also upgrade Perl?
        No? Then did you upgrade Perl on Windows 7? If so. How did you do it?
        Starting to catch my drift now? :)

        Did you install Perl on Windows 7? What Perl did you install/upgrade; Strawberry? ActivePerl? What version?

        The more information you can provide. The better we can help. There is no such thing as too much information. :)

        I'll keep watching, in hopes you'll have some better information to go on. :)
        Best wishes.

        --Chris

        Hey. I'm not completely useless. I can be used as a bad example.