more RE: Polygons & Nodal Points...

cabney cabney at
Thu Jul 26 10:23:32 CDT 2001

This statement turns out to do something different than I expected:

while ( (my $rung) = shift @ladder )
	# ... 

I thought assignment of $rung returned the value assigned to it, but it
seems to be returning a true regardless of whether something is there
to assign.

while ( my $rung = shift @ladder )
	# ... 

helped, but I can't recall what prompted me to put those damn parens
there in the first place! :-p

So in the first example, am I right in thinking (my $rung) is being
eval'd in a list context, in which case I'm getting a -1 return value
when @ladder has been cleared?

[just as an aside, perlfunc has no while() entry, at least my v5.6.1]

There was a time
A wind that blew so young
For this could be the biggest sky
And I could have the faintest idea


The posting address is: san-diego-pm-list at

List requests should be sent to: majordomo at

If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at> with the following
command in the body of your email message:

    unsubscribe san-diego-pm-list

If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at> .
This is the general rule for most mailing lists when you need
to contact a human.

More information about the San-Diego-pm mailing list