in reply to text files are printed after the end of second module
Your code seems a bit incomplete, since I don't see where prerequest_collect_files_db_url is being called, but I'll assume it's called before you do prerequest2.pl?
The thing that stands out to me is that you close your filehandles outside of the sub, why? I suggest you close your files right after you're done with them. Also, you may want to look into lexical filehandles, which aren't global and get closed when they go out of scope (in case you forget to do it explicitly, which you always should anyways). For example: open my $filehandle, "<", "filename.txt" or die $!; my @input = <$filehandle>; close $filehandle;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: text files are printed after the end of second module
by myfrndjk (Sexton) on Jul 06, 2014 at 17:42 UTC | |
by Anonymous Monk on Jul 06, 2014 at 17:53 UTC | |
by myfrndjk (Sexton) on Jul 06, 2014 at 17:59 UTC |