perl tk question:
how do I pass the value I get for $filename in the 1st sub(getListingX) - to the second sub(justTestX)? Please help, I am kind of new to perl.
sub getListingX {
my $filename = $BigFrame->getOpenFile();
if (-X $filename == "1" ) {
print "yippee it's an executable\n";
&justTestX;
}
elsif (-X $filename == "0" ) {
print " $filename is not executable";
&justTestX;
}
}
###############################################
sub justTestX (\$filename){
print "$filename\n\n";
}
how do I pass the value I get for $filename in the 1st sub(getListingX) - to the second sub(justTestX)? Please help, I am kind of new to perl.
sub getListingX {
my $filename = $BigFrame->getOpenFile();
if (-X $filename == "1" ) {
print "yippee it's an executable\n";
&justTestX;
}
elsif (-X $filename == "0" ) {
print " $filename is not executable";
&justTestX;
}
}
###############################################
sub justTestX (\$filename){
print "$filename\n\n";
}