> 
> I'm certain that a tiny 'attempt to connect to the server on
$ENV{DISPLAY} and do nothing' program can be written.
> 

File this under "ugly but works"

.............................. BEGIN PERL PROGRAM ......................
#!/usr/bin/perl
use strict;
use warnings;
my $message = `xlsfonts -fn NOTBLOODLYLIKELYTOOCCUR 2>&1 `;
unless ( $message =~ /pattern.*unmatched/ ) {
    print "No X for you!" ;
} else {
    print "It's not called X-Windows.  It is a window system called `X'\n";
}
............................... END PERL PROGRAM .......................

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
        Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer  software  consists of  only  two  components: ones  and
zeros, in roughly equal proportions.   All that is required is to
sort them into the correct order.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>

Reply via email to