Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-24 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found