in reply to There are errors in this JAPH );

In Mac OS X 10.4.10 Perl 5.8.6:

You need a space before 2>&1 so the shell knows that's not part of the $c argument. You also need to escape the $ characters because the shell interprets them as variable references when unquoted or when inside double quotes.

Even with those changes I get only just  Perl hack,. What error message do you expect $z[1] to generate?

Replies are listed 'Best First'.
Re^2: There are errors in this JAPH );
by goibhniu (Hermit) on Nov 05, 2007 at 15:35 UTC

    Sorry about that. I admit to having a blindspot in Macs. I don't have one and don't have access to one at work. Per your inquiry:

    I get

    %ENV is aliased to another variable while running with -T switch at -e + line 1.

    for $z[1].

    I tried investigating this and it may be that that warning was added as a patch to 5.8, but I can't find what version it was added. (Google hits go back to 2004). Also it has to do with Tainting, so maybe something about the -T is getting messed up (like the space needed before the 2>&1). Does a Mac have an %ENV hash in the OS?

    Update: I tried it on Perl V5.8.7 on Cygwin and $z[1] gives "Use of uninitialized value in concatenation (.) or string at -e line 1." and "Insecure $ENV{PATH} while running with -T switch at -e line 1." after messing around with the quote characters to get it to run at all, so this japh is (very unfortunately) very OS and Perl version dependent. I'll look into another way to generate "another" from the internals, but as I recall there weren't very many.


    I humbly seek wisdom.