Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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.

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://739775]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2017-03-29 03:56 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (343 votes). Check out past polls.