>>>>> "JWK" == John W Krahn <> writes:
JWK> Uri Guttman wrote:
>>
>> >>>>> "JWK" == John W Krahn <> writes:
>>
JWK> Ben Morrow wrote:
>> >>
>> >> One of the things it can be is a regex, and there is a special
>> >> operator '=~' in Perl which means 'match this regex against this
>> >> string'.
>>
JWK> Actually =~ is the binding operator and if used with tr/// there is no
JWK> regex involved.
>>
>> that is a good point that is not mentioned often enough. but what does
>> this do?
>>
>> 'abc' =~ ( foo() . $bar ) ;
JWK> Something similar to:
JWK> 'abc' =~ /@{[ foo() ]}$bar/ ;
correct (except for the context. in mine foo() is called in scalar
context and yours calls it in list context).
my point is that =~ is the binding operator but given just an expression
on the right side (no //, m//, s/// or tr///) it will assume m// for the
expression and compile it as such. so =~ has some regex flavor to it as
well as binding. but i do dislike it being called the regex op (mostly
by newbies who don't know about tr/// and that it is not a regex op).
uri
--
Uri Guttman ------
--------
http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ----------------------------
http://jobs.perl.org