This program runs in the background of my PC and picks up request files and then runs with them. But occassionally it will get caught in a loop at the stage where it says print 'B'; It will then pull out of the loop and continue as before only when I press Control-C at the DOS prompt. I am wondering whether the solution to this problem is to say 'when you have checked all the files' GOTO beginning: ? Does anyone have any suggestions about what is causing this and how best it can be fixed?for(;;) { begining: print "A\n"; foreach my $job (read_dir("G:/Input")) { print "B\n"; next unless $job =~ /(.{1,36})\.txt$/; my $tag = $1; ##'when you have checked all the files' GOTO beginning foreach my $job (read_dir(G:/Output")) { print "D\n";
In reply to Caught in a loop by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |