in reply to Re: file not found with OPEN (reafactor)
in thread file not found with OPEN

Another tip, make more subs, give them good names, give variables good names, ... maybe BeeWork( $indexStore, $filingsStore, $filingsFile, $startyear, $endyear, $startqtr, $endqtr  ); ??? :D

If you make subs your loops can shrink

## yearloop { ## quarterloop { ... BeeIO( $infile, $outfile , \@FormGetRes ); #~ my $downloads = path( $filingsStore, $yr ); my $dlyear = path( $direct, $yr); my @aonly = BeeAonly( $dlyear, $outfile ); BeeFtpGet( \@aonly , $dlyear ); } }

Why subs? If there is a problem in BeeAOnly, you only have to debug BeeAOnly, you don't have to debug all of BeeWork