i wanna try basic code of Tk perl, this the code
the sorce from perlmonkCode:#!/usr/bin/perl -w use strict; use Tk; my $mw = new MainWindow; $mw->Label(-text => 'hello word!')->pack; $mw->Button(-text => 'quit',-command => sub{exit})->pack; MainLoop;
when i wanna run it,i have a bad compiler like this
what i must do for running it....Code:Can't locate Tk.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./GUI.pl line 4. BEGIN failed--compilation aborted at ./GUI.pl line 4.
thanks
Have you downloaded Tk for perl and put it in your path?
oohhh ok master.....
Tk is a library that is not included as part of the standard perl library. You have to download it, possibly install it, etc.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks