Good Evening Monks. I would like to post multiple rows using the following code however only one line is posted when selected any suggestions? Thanks in advance.
#!/usr/bin/perl use Tk; my $window = MainWindow->new; $window->title("Host Report"); ($labs = $window->Label(-text => "Results"))->pack(-side => 'bottom'); $window->Entry(-textvariable => \$hdb )->pack; $window->Button(-text => "Go", -command => \&host )->pack; $window->Button(-text => "Quit", -command => \&stop )->pack; MainLoop; sub host { open (FH,"hostdata.txt"); my @lines = <FH>; close FH; foreach my $hdb2 (@lines) { my @field = split(':',$hdb2); if ($field[0] =~ /(?<![\w-])$hdb(?![\w-])/i) { $labs->configure(-text =>"$field[0] $field[1] $field[2]"); } } } sub stop{ exit; }
In reply to Multiple Rows by PilotinControl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |