polypagan has asked for the wisdom of the Perl Monks concerning the following question:
...which returns an empty string. This kludge-code works (please forgive noisy use of many variables, under development), but not dynamically, and only followingmy $w = $ENV{COLUMNS};
before launch:export COLUMNS
Can someone point me to a simple, working solution? Thanks!# get current width from environment chomp (my $w = `echo \$COLUMNS`); if ($w) { $width = $w - 5; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need nudge: how to (dynamically) discover terminal width?
by Corion (Patriarch) on Nov 24, 2010 at 14:22 UTC | |
by MidLifeXis (Monsignor) on Nov 24, 2010 at 14:51 UTC | |
|
Re: Need nudge: how to (dynamically) discover terminal width?
by johngg (Canon) on Nov 24, 2010 at 20:16 UTC | |
|
Re: Need nudge: how to (dynamically) discover terminal width?
by Khen1950fx (Canon) on Nov 24, 2010 at 18:47 UTC | |
|
Re: Need nudge: how to (dynamically) discover terminal width?
by polypagan (Initiate) on Nov 27, 2010 at 17:46 UTC | |
by polypagan (Initiate) on Dec 01, 2010 at 00:17 UTC |