Hi swifttone,

(which I'm not sure I get: Can't I do (@a , @b) = (@b, @a) now that lists either are or are not flattened?)

Nope. Not according to Exegesis and comments made in the thread Apocalypse 3. According to those comments the slurp behaviour of = hasn't changed.

What is the scope of an alias?

Good question. I'd like to know that too.

Am I not understanding what an alias is? How is $bound := %data{$key} different than $bound = \%data{$key}

Well, lets say %data{$key}="Foo", then in the first case $bound would also equal "Foo", but in the second case $bound would be refrence to the string "Foo" and thus to get at the string would be $$bound="Foo". There were more intuitive examples in Exegesis, like @bound := %data{$key} which would make @bound be an aliase for the array that %data{$key} refrences.

Would $bound := %data{$key} give me a different $bound as $key changed?

Judging by the fact that TheDamian mentioned using aliases as a form of the Pascal/Basic with sturcture, (Yahh!) I would assume so. Which I guess basically answers the earlier question regarding scoping issues, ie that an alias would have to be a scoped entity, but frankly if it is scoped then there are going to be some weird side effects. Like what happens if you declare a variable then alias that varible to something else inside a scope, after the scope does the variable go back to the original value? So that means it could be used to in effect localize a lexical variable, which could get _real_ confusing. :-)

Great questions, I hope TheDamian steps in to clear these points up.

Yves
--
You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)


In reply to Re: Comprehending Binary := by demerphq
in thread Comprehending Binary := by swiftone

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.