Listing E
#!/usr/bin/perl

use lib qw(/usr/lib/libDrakX);
use interactive;
use strict;

my $in = 'interactive'->vnew();
my $wtitle = "Select From List Example";

my $choice = $in->ask_from_list(_("%s", $wtitle), _("Please Make A Choice"),
        [ _("Apples"), _("Bananas"), _("Pears")],
        _("Bananas"),
        _("This Is A ToolTip"));

#if $choice is not null, proceed, otherwise exit

$in->ask_warn(_("%s", $wtitle), _("You selected %s", $choice)) if ($choice ne "");

$in->exit;