I'm on Windows and don't have the scp utility so can't test your code but I notice you use the variable $currentTranStats without having assigned a value to it.
Also note that while a dot between two text variables acts as the concatenation operator, a dot within double quotes is just a dot. For example,
DB<1> $x = 'hello';
DB<2> $y = 'there';
DB<3> print "$x.$y";
hello.there
The values of the two text variables are interpolated into the resulting string, but the dot appears as a literal dot.