in reply to Unable to write to log-file

Use use strict; use warnings;. You are hiding errors by not using them.
print() on unopened filehandle STRM_ALLDevices at script.pl line 11. . print() on unopened filehandle STRM_ALLDevices at script.pl line 11. .. print() on unopened filehandle STRM_ALLDevices at script.pl line 11. [snip]

You open STRM_AllDevices, but you print to STRM_ALLDevices.