Most of the people that uses GTK+ or Gnome are generally pushed to use Python as a scripting language. This is very nice language (a bit strict, but it's also one of its main strength) although it lenghtens the learning curve for a PERL user. Fortunately, here come our good friends: gtk2-perl and gtk2-gladexml.
Installing them on Gentoo is really easy:
emerge gtk2-perl gtk2-gladexml
For other distributions, I would recommend to have a look at your distribution repository. These modules are certainly available.
Now the first step in our little howto is to design our graphic interface. This step is exactly the same as the one described in my little GTK tutorial. As I'm too lazy to copy and paste it here, just jump on it. It's a matter of seconds. Once, you got the file named helloworld.glade, come back around here. I would like to show you more...
... So, you're back again. In the same directory where lies your freshly created graphic interface, just write this little piece of code and name it helloworld.plx
#!/usr/bin/perl
use Gtk2 -init;
use Gtk2::GladeXML;
$gladexml = Gtk2::GladeXML->new('helloworld.glade');
$gladexml->signal_autoconnect_from_package('helloworld');
$window = $gladexml->get_widget('window1');
$window->show_all;
Gtk2->main;
Pretty straightforward. Don't forget to give it the appropriate rights and launch it:
chmod 755 helloworld.plx
./helloworld.plx
And voila:
Note that making modifications on this graphic interface is achieved either by editing the XML file, helloworld.glade, or by using Glade-2.
That could be a good start to add some graphic interface to your scripts.