in reply to Operator/Regex question
Could it have been part of a "=~" token? Bitwise negation ("~") doesn't make much sense there, but "=~" binds the result of an expression to m//, s///, tr// and similar operators. Those operators will then match against that value, and possibly modify it. If no value is bound to the operator, they use $_.
my ($key, $val) = ( $pair =~ /^([^=]+)=(.*)/s );
(The parens optional since "=~" has higher precedence than "=".)
See perlop
|
|---|