When I run this code and it finds the last type of report, the program hangs until I hit enter for each report of this type. I would like for it NOT to do this. What sort of goofy logic error have I committed here?
foreach $xreport (@list) { # code to check to see which subroutine is needed if ($xreport =~ m/XSAColorQube/) { $count++; &Qube; } elsif ($xreport =~ m/XSAcolor/) { $count++; &Color; } elsif ($xreport =~ m/XSAreport/) { $count++; # some have fax, some do not, reports differ, checking open(XRPT,"<$xreport") or die "Cannot open $xreport: $ +!\n"; $line = readline(*STDIN); close(XRPT); if ($line =~ m/EFax/) { &Regular; } else { &NoFax; } } else { print "$xreport does not match expected naming scheme +and was not processed.\n"; } } print "-------------------------------------------\n"; print "Processed $count files.\n"; print "Output combined into report myxrxrpt.csv.\n"; close(OUT);
In reply to Pausing on extra IF by ratboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |