in reply to Re: How to detect X?
in thread How to detect X?

Easier, eh? How about this:
perl -MTk -we "print tkinit->server"
Sorry, couldn't resist...

Replies are listed 'Best First'.
Re^3: How to detect X?
by Courage (Parson) on Feb 22, 2005 at 05:04 UTC
    it was easier for me to find in docs: I remember I saw it somewhere in Tk but had only Tcl/Tk handy.

    In my opinion Tcl::Tk is more Tk than Tk, because first one refers to most recent and up-to-date one.

    addition: as long as Tcl::Tk many compatible with Tk, and based on your post, here are two other ways which indeed work:

    perl -MTcl::Tk -we "print Tcl::Tk::tkinit->server"
    or
    perl -MTcl::Tk=:perlTk -we "print tkinit->server"