Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: foreach $1

by LanX (Saint)
on Jun 08, 2020 at 23:55 UTC ( [id://11117841]=note: print w/replies, xml ) Need Help??


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

> 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://11117841]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-25 13:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found