Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Tell me how it works!

by nagalenoj (Friar)
on Jan 29, 2009 at 05:43 UTC ( #739775=note: print w/ replies, xml ) Need Help??


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

Dear monks,

Now, I have another question, how can I clear the *b when undef the *a, in the above scenario?

That is, when doing

*b = *a; undef *a;
The contents of *b is not cleared. Is it possible to clear that too with the help of glob?

Yes, ofcourse without using undef *b; And also, it is understood that undef $a; or undef @a will affect $b and @b.


Comment on Re^4: Tell me how it works!
Download Code
Replies are listed 'Best First'.
Re^5: Tell me how it works!
by ikegami (Pope) on Jan 29, 2009 at 15:36 UTC

    undef @a; would do it. @a = (); is better
    undef @b; would do it. @b = (); is better

    @$glob = (); if you have a glob.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (19)
As of 2015-07-29 14:56 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 (263 votes), past polls