Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Help with a logical structure for an if statement

by toolic (Chancellor)
on Apr 29, 2012 at 19:10 UTC ( #967966=note: print w/ replies, xml ) Need Help??


in reply to Help with a logical structure for an if statement

Here is code that compiles without errors:

if ( ($player_one_race =~ m/terran/ && $player_two_race =~ /zerg/) || +($player_one_race =~ m/zerg/ && $player_two_race =~ m/terran/)) {}
Consider using eq instead of regexes.


Comment on Re: Help with a logical structure for an if statement
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://967966]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (19)
As of 2013-06-20 11:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many continents have you visited?









    Results (685 votes), past polls