Sep 22, 2003 #1 ffrkyu Programmer Sep 22, 2003 2 NZ When I do ($a eq $b), I have several vaules for $a. And if any one of them matches $b, it returns true. so how can I assign those values to $a. eg, $a can be 1,2,3 $b is 2. $a=??? Thanks
When I do ($a eq $b), I have several vaules for $a. And if any one of them matches $b, it returns true. so how can I assign those values to $a. eg, $a can be 1,2,3 $b is 2. $a=??? Thanks
Sep 22, 2003 #2 sampsonr Programmer May 22, 2002 75 US It's not very clear what you're asking here. Can you clarify? Since $a is a scalar variable, how can it have several values? Also, since the values you cite are numbers, rather than strings, you should be using ($a == $b), not ($a eq $b). Upvote 0 Downvote
It's not very clear what you're asking here. Can you clarify? Since $a is a scalar variable, how can it have several values? Also, since the values you cite are numbers, rather than strings, you should be using ($a == $b), not ($a eq $b).
Sep 22, 2003 Thread starter #3 ffrkyu Programmer Sep 22, 2003 2 NZ Actually, this is a web-based game. I'm tring to figure out how to win it every time. The code... ... @b=(1,2,3,4,5,6); $a1=$b[rand (@b)]; if($form_input eq $a1){You win and get some credits} if($form_input ne $a1){Lose} Can I put append something to the URL to make me a winner? Upvote 0 Downvote
Actually, this is a web-based game. I'm tring to figure out how to win it every time. The code... ... @b=(1,2,3,4,5,6); $a1=$b[rand (@b)]; if($form_input eq $a1){You win and get some credits} if($form_input ne $a1){Lose} Can I put append something to the URL to make me a winner?
Sep 22, 2003 #4 sampsonr Programmer May 22, 2002 75 US Your closing statement begs for a sarcastic remark, but I'll just wish you luck and move on. I don't participate here to help cheat at games. Upvote 0 Downvote
Your closing statement begs for a sarcastic remark, but I'll just wish you luck and move on. I don't participate here to help cheat at games.