Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: foreach $1

by ikegami (Patriarch)
on Jun 08, 2020 at 22:25 UTC ( [id://11117836]=note: print w/replies, xml ) Need Help??


in reply to Re: foreach $1
in thread foreach $1

if $a is a special var then @a and %a will act special too, even without carrying a meaning.

Well, they are considered "declared", but that's the extent of it.

Replies are listed 'Best First'.
Re^3: foreach $1
by LanX (Saint) on Jun 08, 2020 at 23:55 UTC
    > I.e. if $a is a special var then @a and %a will act special too, even without carrying a meaning.

    > > Well, they are considered "declared", but that's the extent of it.

    Nope, e.g. $% is a special var which is global, @% isn't documented anywhere, but still global

    DB<1> x @%=1..3 0 1 1 2 2 3 DB<2> x {package A; @%} 0 1 1 2 2 3 DB<3> x @a=1..3 # not global 0 1 1 2 2 3 DB<4> x {package A; @a} empty array DB<5>

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-19 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found