Hello
humble,
I'm not sure I understand your question. Can you show us some code demonstrating what you are trying to do? Without that, I have a few guesses to get at what you need:
- If you have Term::ReadKey installed, you can use GetTerminalSize to hint at the terminal width and scale down your line length to some fraction of it. Here's the reference to that sub in the module.
- For a nearly useless answer: how about my $len = scalar length $oldmsg? :-)