B
bengt wikenfalk
Hi.
I wonder about the difference between =~ and = ~
I wrote a script with the following expression:
return $c if ($name = ~ /^OK$/);
($name is an array reference (ARRAY=0x....)
This works ! (if the array contains the string "OK", $c will be returned.
if I change the code to $name =~ ... it does not work however (which
actually makes me relieved ..)
Is this a standard feature ? Can anyone describe what happens here ?
(I'm running Perl 5.6 under cygwin)
I wonder about the difference between =~ and = ~
I wrote a script with the following expression:
return $c if ($name = ~ /^OK$/);
($name is an array reference (ARRAY=0x....)
This works ! (if the array contains the string "OK", $c will be returned.
if I change the code to $name =~ ... it does not work however (which
actually makes me relieved ..)
Is this a standard feature ? Can anyone describe what happens here ?
(I'm running Perl 5.6 under cygwin)