I have the following bit of code
This code is for handling double clicks on a Tk-Listbox. Which should attempt to open a file/dir, and then when it is open check to see if it is a directory. If the selected listbox item is a directory it should call fillQueryBox(), if its not it should simply insert the item selected into another Tk-Listboxopen TEST,$path."\\".$item && do{-d TEST ? fillQueryBox($path."\\".$item,$qBox) : $cBox->insert('end +',$item); close TEST; last CLICK_OPTION;};
the error I am getting is -d on closed filehandle TEST at C:/Perl/lib/list_maker.pl line l47 It was my understanding that a file open returned true on success... so it would pass the && and fall into the do{} block, implying the file or directory was open for me to call a -d <HANDLE> on.
WHAT AM I MISSING?...pardon the frustration.
In reply to File closing on its own? by Grygonos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |