Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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
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 rifling through the Monastery: (5)
As of 2014-07-29 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls