[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Perl Card Games




Uri wrote:
> 
>   JP> But I don't think that's as fun as 
>   JP> 	@$_ = (...) for @hands;
> 
> but it ain't fun if it don't work. :-)

Yes, it's the same old story with the same old moral:
If you want to look like a fool, post untested code.


> aside from the loop problem, what did you even mean by @$_? a numeric
> symref?

This is what I had in mind:

        @a = (undef) x 5;  # any value; it will get overwritten.
        for ( @a ) {
		@$_ = (....);
        }

Now, as for the loop problem: why is the semantics of for as
a statement modifier so different from the normal for?

John Porter


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe