I have a curious permissions problem with perl. This is a snippet from my ~/.bashrc:
# determine terminal D_TERM=`tty | perl -e 'print /tty/ ? "vt220" : "xterm-color"'` TERM=${D_TERM}
This is interesting since I can actually execute the perl binary, and I am a member of the perlusers group (whom own the perl directory). Here's more interesting stuff:
18:25:28 [alex : macachu : ~] [3] $ tty | perl -e 'print /tty/ ? "vt220" : "xterm-color"' Can't open perl script "-e": Permission denied 18:25:55 [alex : macachu : ~] [5] $ tty | perl <<EOP [ Continued ] > print /tty/ ? "vt220" : "xterm-color" [ Continued ] > EOP xterm-color18:26:30 [alex : macachu : ~] [6] $
So there is something in the way that perl is interpreting the -e. This worries me. What would allow me to use heredoc perl as well as scripts but not -e?

freaked out,
brother dep.

ps. in contrast to some of my recent posts, this is my home box, and i am rootly here. :)
pps. i just also noticed that this will always print the latter since its evaluating $_ when I really want $_[0].
update: no, there are no perl aliases.
update2:well, merlyn rightly suggested i strace(1) or truss(1) it, and lo, /dev/null was not world readable. problem fixed.

--
Laziness, Impatience, Hubris, and Generosity.


In reply to Perl '-e' permissions problem. (code) by deprecated

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.