byoungvt has asked for the wisdom of the Perl Monks concerning the following question:
I am having a little problem, I want to be able to have a script which has both a tk gui and a text interface. However if I use "use" to load Tk perl chokes when it tries to load/compile the module on machines where it is not installed; I have since switched to require (not really knowing what it does), and it kinda works is require just like an #include???? Is this the proper solution??? Or do ya' all monks have something proper and elegant????
BJYsub buildgui { (my $fname)=@_; require Tk; require Tk::FileSelect; my $mw=MainWindow->new; $mw->title("DNA to Protein"); my $LoadDialog = $mw->FileSelect(); $LoadDialog->configure();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(ichi) Re: use/require TK, What up with that??
by ichimunki (Priest) on Mar 15, 2002 at 22:54 UTC |