In the statement below ... 1. What does the (!~) mean? 2. What do the forward slashes mean around (not stop)? if($CPC_stop_type[$i] !~ /not stop/){
The !~ operator basically means "does not match", on its left-hand side is the thing being matched against (usually a string), and on its right-hand side is the thing doing the matching, such as a regular expresion. /not stop/ is a regular expression (regex) that looks for the characters not stop (this particular regex does not contain any characters that have a special meaning in regexes). In English, that line of code reads as "If the $ith element of the array @CPC_stop_type does not contain the sequence of characters not stop, then ..."
In reply to Re: Forward slashes around argument
by haukex
in thread Forward slashes around argument
by thnksnw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |