Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: MCE seemingly stray array in sample code for Strassen's algorithm

by BillKSmith (Chaplain)
on Apr 14, 2013 at 02:33 UTC ( #1028589=note: print w/ replies, xml ) Need Help??


in reply to Re: MCE seemingly stray array in sample code for Strassen's algorithm
in thread MCE seemingly stray array in sample code for Strassen's algorithm

Your use of the word "global" is truly discriptive, but I believe that perl documentation reserves it for package variables. A possible alternative is "file scope variable".

Example: The description of "our" in perlfunc contains the following quote.

our associates a simple name with a package (read: global) variable in the current package,...
Bill


Comment on Re^2: MCE seemingly stray array in sample code for Strassen's algorithm
Re^3: MCE seemingly stray array in sample code for Strassen's algorithm
by NetWallah (Abbot) on Apr 14, 2013 at 05:32 UTC
    "File scope" is also potentially incorrect - if the code has several nested blocks in the file, only those declared in the outer-most block could be considered to be "File scope".

    The correct terminology is "lexical scope".

    From "perldoc -f my" :
    .... local (lexically) to the enclosing block, file, or "eval".

    In this case, the subroutine is accessing a variable declared in an enclosing block.
    I suppose this could be considered "global to the subroutine".

                 "I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
            -- Dr. Cox, Scrubs

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1028589]
help
Chatterbox?
and the web crawler heard nothing...

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

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls