in reply to Looking for alternative syntax for assigning variables based on regex matches

With non-destructive /r modifier (and lookahead):
perl -wle '$foo = "a hello w"; $foo = $foo =~ s/(?=.*(hello)).*/$1/sr; + print $foo'
And if you want only to use your capture, just:
...; print $foo =~ s/(?=.*(hello)).*/$1/sr;
In the later example a value of $foo didn't change.

+one more way:
...; $foo =~ /hello(?{ $foo = $& })/; print $foo
Though it looks like bad practice to change a variable while it is in use.