I am using the ASCII Controll Sequences to move the cursor on the screen (my site does not have Term::ANSIScreen installed and so I must make do with what we have).
The way it works is like this.
print ("\033[2;5H");
Which would position the cursor to down 2 rows and over 5 columns from top left.
I can use variables by doing the following
$columns = 5;
print ("\033[2;${columns}H");
But my problem comes from when I want to increment the variable without using an intermediate step.
Such as;
$a = 5;
print ("\033[3;${a}HStart Here $a");
print ("\033[4;${$a+=10}HEnd Here $a\n");
What prints out is
Start Here 4
End Here 14
So Perl is updating $a, but it doesn't seem to be passing it to the Escape Sequence. Since "End" starts against the wall that means it getting no value.
I know I can do
$a+=10;
inbetween the print statements, but I was wondering if I can shorthand it even more.