Scenario is. I have a process listening which when it receives an input it forks and runs a module which inputs the data into a database.
In this module (package name DB_input ) i have used “use vars qw($dbh $timestamp $server)" . I am occasionally having mangled data go into the database and i wonder if it is because of the “use vars” ? Is it possible that when the listener forks 2 or more children at the same time, that the variables defined by “use vars” can end up being shared between the forked children ?
In which case would using "our" be better as i understand it is more tightly scoped ? thank you .In reply to to "use vars" or not to by westy032001
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |