Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: Tell me how it works!

by massa (Hermit)
on Jan 28, 2009 at 15:28 UTC ( #739608=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Tell me how it works!
in thread Tell me how it works!

undefing @a would've cleared it, affecting one of the things that the symbol "b" also points to:

$ perl -le '@x = qw(1 2 3); $x = 1; *y = *x; undef @x; print "$y [@y]" +' 1 []
but undefing *a clears the entries for "a" in the symbol table, without affecting the things that the symbol "b" also points to:
$ perl -le '@x = qw(1 2 3); $x = 1; *y = *x; undef *x; print "$y [@y]" +' 1 [1 2 3]
[]s, HTH, Massa (κς,πμ,πλ)


Comment on Re^4: Tell me how it works!
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2015-07-30 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls