So when are "< file", "file", and "<file" all the same string? When I use them in the second-argument-to-open context, of course!

My point is that the concept of "context" isn't always the best choice and you have found a case where it isn't. *b and \*b are different (but somewhat similar) scalar values. You can prove that "context" isn't what makes these act the same here:

$b= "B"; *y= *b; print "$y\n"; *y= \*b; print "$y\n";
by noting that they also act the same here:
$b= "B"; $x= *b; *y= $x; print "$x: $y\n"; $z= \*b; *y= $z; print "$z: $y\n"; __END__ Produces: *main::b: B GLOB(0x1bb2b1c): B

So it isn't that *y= provides some special, magical context that causes *b and \*b to be the same. It is that the act of assigning something to a glob ends up calling some C function inside of perl and that C function decides to do the same things when given a glob or a ref to a glob.

        - tye (but my friends call me "Tye")

In reply to (tye)Re: Taken out of Context by tye
in thread Taken out of Context by Petruchio

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.