Okay, people, she's BAAAACK! My apologies for the elementary nature of my questions, but I am not now, nor have I ever been, a programmer. Closest I've come is JCL maintenance on MVS mainframes, which kind of explains why I have this question....

What is the syntax for assigning values to local variables? Here are a couple of examples:

local $GTENV = ltcd; # local = available for whole script? my $BNAME = ICVALID; # my = NOT available to subroutines? my $GTSTARTUP_T = "O:\Tools\GraphTalkDeveloper\R3212\bin\GTvrtt.exe"; + # enclose values w/ spec chars in ""s?

Is there a standard for how many spaces to leave between the variable name and the assignment operator? How does one know whether to enclose a value in single-quotes, double-quotes, parentheses, or nothing? Does it look like I understand correctly (if at a really basic level) the use of "my" vs. "local"?

I SWEAR I have RTFM, so to speak (searched online & in the 4 Perl books I have), but I must have missed it, assuming it's there. Any hints on where to find the answers? Thanks for your patience; you monks seem to be to have the largest volume of it of any usenets.

20060427 Janitored by Corion: Added formatting, code tags


In reply to local variable syntax by yburge

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.