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

Backticks fail silently under Windows 7, 64 bit, and Perl 32bit. This code produced an empty string:

my $b= `dir`;

I fell into this trap, then realized I shifted to a 64bit windows Professional since last running Perl under Windows Vista.

The cure - get rid of all old 32 bit Perl installations, install 64 bit.

Replies are listed 'Best First'.
Re: Backtick failure in Windows 7 (common pitfall)
by Anonymous Monk on May 10, 2014 at 07:15 UTC
Re: Backtick failure in Windows 7
by ww (Archbishop) on May 09, 2014 at 23:22 UTC

    ... and the question is? Or did you mean to have this information added to -- say -- Mediations?



    If you didn't program your executable by toggling in binary, it wasn't really programming!

Re: Backtick failure in Windows 7
by 2teez (Vicar) on May 09, 2014 at 18:50 UTC

    And did you do print $b;?

    If you tell me, I'll forget.
    If you show me, I'll remember.
    if you involve me, I'll understand.
    --- Author unknown to me
Re: Backtick failure in Windows 7
by locked_user sundialsvc4 (Abbot) on May 11, 2014 at 02:40 UTC

    With all due respect, “I’m from Missouri ... show me.”   While I can be convinced of anything, “my BS detector is going off” when you categorically say that “backticks don’t work” in this changed environment when identical code in earlier days produced the desired result.   Therefore, please show the error of my ways – what, exactly, do you think is the underlying technical explanation for “a 32-bit application, i.e. the Perl interpreter,” suddenly losing the ability to do this?   You have obviously explored this issue at some length by now.   I will even concede that surely you are correct, that you really did know what you saw, and that I merely do not yet know why it could possibly be so.   Please tell us more about your findings.