$MessageLines[$#MessageLines] =~ m/^.*\S/sg; my $CursorCol = pos $MessageLines[$#MessageLines];
Then substr can be used to obtain $Prompt.
In reply to Re: A Better Way to Find the Position of the Last Non-Whitespace Character in the Last Element of an Array.
by moritz
in thread A Better Way to Find the Position of the Last Non-Whitespace Character in the Last Element of an Array.
by NateTut
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |