in reply to Perl Tk Insert

G'day PilotinControl,

Issues with the code you posted:

The following script shows the guts of what you need.

#!/usr/bin/env perl use strict; use warnings; use Tk; use Tk::BrowseEntry; my $mw = MainWindow->new; my $ctrl_F = $mw->Frame->pack(-side => 'bottom'); $ctrl_F->Button(-text => 'Exit', -command => sub { exit })->pack; my $app_F = $mw->Frame->pack(-side => 'top'); my $be = $app_F->BrowseEntry->pack; while (<DATA>) { chomp; $be->insert(end => (split /:/)[1]); } MainLoop; __DATA__ prefix:Owner A prefix:Owner B prefix:Owner C

As you can see, although that's very short, it's a working script that you can run (as is). It contains no distracting noise (e.g. widget decorations, foreground/background colours, etc.) and merely addresses the issue at hand. Please attempt to provide something like this when you post your next question.

-- Ken

Replies are listed 'Best First'.
Re^2: Perl Tk Insert
by PilotinControl (Pilgrim) on Feb 18, 2014 at 19:15 UTC

    Thanks Ken! I did figure it out using a longer version...your code was much shorter. Thanks.