in reply to declare string with addition of two variables

sprintf is also good for this sort of thing:
$x = sprintf "Expected value is %d", $y + 2;
You could put parens around the args for sprintf (I do, just about every time I use it, and just out of habit from my C coding days), but they are optional.