$foo = $bar =~ s/this/that/; #which will return the result of a substitution #because of the lower priority of assignment operator