good chemistry is complicated,
and a little bit messy -LW
scalar or sub that can tell me the terminal print offset ?by palkia (Scribe)
|on Mar 17, 2012 at 17:15 UTC||Need Help??|
palkia has asked for the
wisdom of the Perl Monks concerning the following question:
I'm Looking for a scalar or a subroutine (or whatever),
that can tell me how many chars been printed
since the beginning of the current printed line in the terminal.
Does something like that exist, or do I must write it myself ?
Thanks for replaying everyone
It's not an XY problem, as it is (to me) an abstract problem.
(unless you refer to the flashing marker's XY co-ordinates ^^)
Although I agree it's a good guess, it is not for wrapping purposes.
I just need the column (x co-ordinate) of the marker.
In this specific case it's for a generalized-menu-printing function (specially designed for my format), which I'm working on,
but I found solving this problem necessary many times before for multiple applications (which I can't recall ^^).
So please think about it as a "how to get the marker's column" riddle/abstract problem,
rather than what possible uses can it have, and what alternatives can be used instead.