Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^5: if (defined @arr) problem

by secret (Beadle)
on Dec 15, 2005 at 08:32 UTC ( #516953=note: print w/replies, xml ) Need Help??


in reply to Re^4: if (defined @arr) problem
in thread if (defined @arr) problem

    remove all of the elements of the array

Well that would be @array = ()

    replace all of the elements with the value undef

That could be @a = (undef) x scalar @a

So yes , saying "undef an array" i meant  undef @a . I do think it's what the OP was meaning to do when trying to affect one single undef value to the whole array . This really sounds like undef @array.

Now about delete for the moment i never got to use it, neither did i use exist . I gather it's because they are used mainly with objects, are they ?

Regards,
secret

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2020-02-21 16:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (96 votes). Check out past polls.

    Notices?