$_ = 'this is foo here'; sub foo {return 'foo'} print "Yup\n" if m/@{[foo()]}/; print "Yup\n" if m/${\(foo())}/;