Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Re: Clearing Array Values

by Anonymous Monk
on Feb 10, 2002 at 03:53 UTC ( #144437=note: print w/replies, xml ) Need Help??

in reply to Re: Clearing Array Values
in thread Clearing Array Values

$#array=() is equivilent to $#array=0 (since () is a zero-element list)

If you mean that () returns 0 in scalar context because the parentheses are empty you're way off. In the expression $#array = () there is no list. The parentheses are used for precedence only! There's no such thing as a list is scalar context -- or at least not that I know of. Since there's nothing inside the parentheses the undefined value will be returned.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2021-03-03 02:45 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (69 votes). Check out past polls.