Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[olive][b]if[/b][/olive] [red]([/red][url=http://perldoc.perl.org/functions/grep.html][black][b]grep[/b][/black][/url] [red]{[/red][blue]$myVar[/blue] eq [blue]$_[/blue][red]}[/red] [blue]@myArray[/blue][red])[/red] [red]{[/red]
[gray][i]# At Least 1 Match - do stuff[/i][/gray]
[red]}[/red] [olive][b]else[/b][/olive] [red]{[/red]
[gray][i]# No Match - do other stuff[/i][/gray]
[red]}[/red]
[blue] DB<1>[/blue] @myArray = qw(P Q R S)
[blue] DB<2>[/blue] $myVar = "S"
[blue] DB<3>[/blue] print $myVar~~@myArray
1
[blue] DB<4>[/blue] $myVar = "F"
[blue] DB<5>[/blue] print $myVar~~@myArray
perlsyn said:Note that the "Matching Code" column is not always an exact rendition. For example, the smart match operator short-circuits whenever possible, but grep does not.