gammaman64
Programmer
I am very new to Perl and I am trying to get data that was capurted with a Dialog Widget, to display the searched results out in a Label Widget. Iam having some difficulty, any help would be greatly appriciated.
sub check {
my $check = $mw->DialogBox (
-background => 'red',
-title => 'Type the file you wish to check',
-buttons => [ 'OK', 'Cancel' ],
-default_button => 'OK',
);
my $txt;
my $entry = $check->Entry (
-textvariable => \$txt,
)->pack;
my $clicked = $check->Show();
return unless $clicked eq 'OK';
** I want the Label widget to automaitcally execute
upon the user clicking OK;
foreach $txt (@ARGV){
**** I want all of this to be displayed in a Label Widget.
print ("Checking $txt:");
if (-f $txt){
print ("The file $txt is:");
print ("readable")if(-r $txt);
print ("writable")if(-w $txt);
print ("executable") if (-x $txt);
}
elsif (-d $txt){
print ("$txt is a directory");
while ($txt)
{
(how many files are in the directory).
my $count +=1;
}
}
}
}
Thanks again to anyone who helps.
sub check {
my $check = $mw->DialogBox (
-background => 'red',
-title => 'Type the file you wish to check',
-buttons => [ 'OK', 'Cancel' ],
-default_button => 'OK',
);
my $txt;
my $entry = $check->Entry (
-textvariable => \$txt,
)->pack;
my $clicked = $check->Show();
return unless $clicked eq 'OK';
** I want the Label widget to automaitcally execute
upon the user clicking OK;
foreach $txt (@ARGV){
**** I want all of this to be displayed in a Label Widget.
print ("Checking $txt:");
if (-f $txt){
print ("The file $txt is:");
print ("readable")if(-r $txt);
print ("writable")if(-w $txt);
print ("executable") if (-x $txt);
}
elsif (-d $txt){
print ("$txt is a directory");
while ($txt)
{
(how many files are in the directory).
my $count +=1;
}
}
}
}
Thanks again to anyone who helps.