#!/usr/bin/perl use Gtk2; Gtk2->init(\@ARGV); my $window = Gtk2::Window->new('toplevel'); my $button = Gtk2::Button->new_with_label("Hello World"); $window->add($button); Gtk2::GSignal->connect($button,"clicked", sub { Gtk2->quit(); return 0 }); $window->show_all(); Gtk2->main(); exit 0;