Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Clearing Array Values

by Anonymous Monk
on Feb 10, 2002 at 03:53 UTC ( [id://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.

-Anomo

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2025-04-25 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.