I think it's just a commented out piece of code. Perl only gives special meaning to #!, not to # by iteslf, unless you consider comments "special" ;) . And the `backticks` containing which perl are the same as qx/which perl/, which is also a little wierd because the command is executed in void context. ...actually it's not executed at all because it's commented out.

I don't know the nuances of Solaris ksh, but perlrun doesn't give any indication that #`....` would have some special meaning aside from a comment.

Response to OP's update:
Now it makes sense. With the #! (as you've indicated in your update), the shell invokes the backticks (perl doesn't), essentially expanding `which perl` to something along the lines of "/usr/bin/perl" (or whatever the output of "which perl" happens to be on your configuration). perlrun does state that whatever follows #! on the first line will be executed, so it's not surprising this should work in a unix flavored environment.


Dave


In reply to Re: different first line in perl by davido
in thread different first line in perl by greatshots

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.