Folgendes Programm:
Code: Alles auswählen
#!/usr/bin/perl
use warnings;
use strict;
use Tk;
our ( $name, $vorname, $strasse, $stadt );
my $dateiname = "adresse.txt";
my $mw = MainWindow->new ( -title => "Adress" );
my $label_1 = $mw -> Label ( -text => 'Name' ) -> pack ();
my $eintrag_1 = $mw -> Entry ( -relief => 'groove',
-textvariable => \$name ) -> pack ();
my $label_2 = $mw -> Label ( -text => 'Vorname' ) -> pack ();
....
Folgende Fehlermeldung:
Was muss ich hier noch ändern?Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
couldn't connect to display ":0" at /usr/lib/perl5/Tk/MainWindow.pm line 55.
MainWindow->new(-title,Adress) at /home/chris/workspace/Adress-DB/adress_1.pl line 10
Gruss Christian