Try this:
perl -e 'print STDOUT x x x + x x x;'
That prints "0". The first bareword argument to print is being treated as an output file symbol. Is this meant to be an obfuscated/trick question? I don't see why anyone would write this code otherwise.

Update:I dumped the code as follows,

> perl -MO=Concise -e 'print x x x + x x x;' c <@> leave[t1] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v ->3 b <@> print vKS ->c 3 <0> pushmark s ->4 5 <1> rv2gv sKR/1 ->6 4 <#> gv s ->5 a <2> repeat[t2] sK/2 ->b 8 <2> repeat[t1] sK/2 ->9 6 <$> const(SPECIAL Null)[t4] s/BARE ->7 7 <$> const(SPECIAL Null)[t5] s/BARE ->8 9 <$> const(SPECIAL Null)[t6] s/BARE ->a -e syntax OK
I believe the parse is saying: 'Print to file handle "x" the value of global symbol "x" (null) repeated the number of times given by the expression (the value of global symbol "x" (null) repeated "x" (null) times)'.

Update 2: Interestingly, the following prints "xxx":

perl -e 'print STDOUT x x + 3;'
Where is the string value "x" coming from? A bareword symbol must stringify to its own name.

In reply to Re: what gives? by tall_man
in thread what gives? by Mondongo

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.