Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
The first choice ($_) is the only one I've ever used before (well that's not including "other" which I've certainly used before =) ). Would anyone care to give a terse summary of the usefulness and appropriate contexts for each of the others? For MonksInTraining, it would be nicely instructional. Thanks muchly in advance. TTFN & Shalom.

-PipTigger
p.s. Come to think of it, I like $# better than $_ but it's more like $#xxxx and you don't really get $_xxxx so it probably doesn't belong. =) I'm a dork.
p.p.s. So as not to be a hypocrite, for those who haven't seen $#xxxx before, it is the scalar value associated with the last indexable value in an array (er list... whichever is the politically correct name for it these days). You can quickly modify the size of an array/list by assigning a new value to this scalar (ie. To cut the array junklist in half rounded up do: $#junklist /= 2; ). Keep in mind that this value is always one less than the scalar context of the array name itself (ie. @junklist). This is true even in an empty list when the scalar context for @junklist == 0 && $#junklist == -1. Happy Hacking! =)

In reply to RE: Favorite Symbol Variable by PipTigger
in thread Favorite Symbol Variable by vroom

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (10)
    As of 2014-07-22 21:59 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (129 votes), past polls