in reply to Pattern match array
If you're using 5.10 you can use the new ~~ operator: if( $_ ~~ @prims ) { print "found item: $_\n"; }
Update: Although as has been mentioned for some of the other solutions this is trying to do an eq match; if you're looking for a substring you probably want one of the join-y solutions.
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|