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

Re: [MacPerl] &MacPerl'Pick --> Variable



>Why won't this work?  Can anyone help?
>
>Dakota Duff
>
>
>
>$| = 1;
>
>$anim = &MacPerl'Pick("What kind?","Buffalo","Elk");
>$spec = &MacPerl'Pick("What kind?","Bull","Cow","Bull Calf","Heifer
>Calf","1 YR Old Bull","1 YR Old Heifer","2 YR Old Bull","2 YR Old Heifer");
>
>
>if ($anim == "Buffalo")   {
>  $aa = "BUF";
>}

etc.

Because "==" is the number comparison operator.
You want to use "eq" instead.

--
Paul DuBois
paul@snake.net
Home Page: http://www.primate.wisc.edu/people/dubois
Software:  http://www.primate.wisc.edu/software



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch