if( my $foo = bar(@quux) ) { $foo exists here } # no foo here #### (my $copy = $original) =~ s/foo/bar/;