in reply to Re^2: Logging module sometimes writes its file in the wrong directory
in thread Logging module sometimes writes its file in the wrong directory

If you want to use the directory where your script is, then yes. You can also use:
use FindBin qw($Bin); my $dir = $Bin;
-imran
Update: if you want to open the file in the current directory that you are in, don't use $dir, just do open with the filename. This is unless a chdir was done.
  • Comment on Re^3: Logging module sometimes writes its file in the wrong directory
  • Download Code