| [reply] |
See also perldoc -q "screen size" for the underlying ioctl incantation if you don't have Term::ReadKey installed.
And a bit of style advice: adding "!!!" to your titles doesn't make anyone want to answer them any more, and in fact will probably annoy people.
| [reply] [d/l] |
In addition to the advice from adrianh and Fletch, on many Unices you can catch the WINCH (WINdow CHange) signal to tell you that the user has resized your display area, and you should check the size again.
| [reply] [d/l] |
These really aren't that tough to find.
Please reference this link for the original question by a Mr. Jeff Silverman.
I want to build a perl script that adapts dynamically to terminalsize
I am working on a perl program which uses VT100 style escape codes and
runs in gnome-terminal or konsole or rxterm or xterm or similar.
I want to know if there is a way to sent an escape sequence to the
terminal emulator which queries for the current size of the screen and
gets a report back.
Does anybody know how to do this?
Many thanks,
Jeff Silverman
This is ridiculous.
--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; =
qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
| [reply] [d/l] [select] |
don't overuse '!!!', next time when you'll really need to emphasize, effectiveness of your exclamation marks will be lower. | [reply] |