I'm sure there are more elegant soultions, but this works: perl -e ' @x = qx(stty -a); @y = split(/\s/, $x[1]); $y[2] =~ s/;//; print "screen size is $y[2] x $y[5]" '
"stty -a" works on every *nix system I know. Some systems have 'stty -size' to help with exactly what you are asking. Hope that helps. -Jeff --- Luinrandir Hernsen <[EMAIL PROTECTED]> wrote: > Ok i tried it... > do I have to parse the info or what? > or do I set it up in an if/ifels/else ? > sorry if I sound dumb, but i'm just learning perl. > thanks > Lou > > > > ----- Original Message ----- > From: "Jeff Westman" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, March 27, 2003 3:16 PM > Subject: Re: screen size question > > > > system("stty -a") should get you what you want.... I don't know if perl > has > > anything 'built-in'. > > > > > > -JW > > > > > > --- Luinrandir Hernsen <[EMAIL PROTECTED]> wrote: > > > how do I find the current screen size of someone running my perl > program? > > > many thanks > > > Lou > > > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! > > http://platinum.yahoo.com > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]