Since you're using: while(@InputFileLines) { shift @InputFileLines;}
to empty your list in the cleanup block there, I'm assuming you're not removing lines from the list in the "do some other stuff" block, in which case your conditional is never going to be true. If I'm wrong, the code above is redundant (and in any case would probably be better written as @InputFileLines = (); but that's another story), but your problem is elsewhere. On 12/15/06, JoeManFoo <[EMAIL PROTECTED]> wrote:
Hi all, Have a dumb question/issue. I've coded up my GUI and am trying to do a simple thing of looping though records and for each record I want to fill in my GUI with the data for the current record and wait for the user to make some action...when the action is performed, then I process the action and go on to the next record...simple and I've got that part working as intended. What I'm having a problem with is when there are no more records...the same method to populate the interface just goes into an infinite loop, anyone bump into this early on in their win32-gui codding childhood? Here's a little snip of the code and the logic I think I'm trying to do... my $InputFileTotalLines = @InputFileLines; if($InputFileTotalLines == 0) { print "Closing up the file, the end has been reached my friend ($InputFileTotalLines:$INPUT_FILE_LINE_COUNT)...\n"; close $OutputFileHandle if defined $OutputFileHandle; $INPUT_FILE_LINE_COUNT = 0; while(@InputFileLines) { shift @InputFileLines;} &clearGUI; } else { ...do some other stuff } .... Thanks in advance, ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
-- Geoffrey Spear http://www.geoffreyspear.com/