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, 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

use Gtk2 -init;
use Gtk2::GladeXML;
$gladexml = Gtk2::GladeXML->new('');
$window = $gladexml->get_widget('window1');

Pretty straightforward. Don't forget to give it the appropriate rights and launch it:

chmod 755 helloworld.plx

And voila:
PEM's Gentoo

Note that making modifications on this graphic interface is achieved either by editing the XML file,, or by using Glade-2.

That could be a good start to add some graphic interface to your scripts.