in reply to Unable to write to log-file

try using print (STRM_ALLDevices "$file\n"); instead of print STRM_ALLDevices ("$file\n");

Replies are listed 'Best First'.
Re^2: Unable to write to log-file
by sselva (Novice) on Jul 29, 2009 at 16:06 UTC
    Hi , As you said you need the list of directories in to a log file, for this you can use the flie commands. here is the code which is working fine for me , as it will read all directories inside in the given path .
    ( path have to be given in command line for exampel perl <file name> <folder name> .
    use File::Path;
    use File::Find;
    use vars /@files $file $path/;
    $path = $ARGV[0];
    find sub{ push @files, "$File::Find::name" if(-d
    $File::Find::name); },$path;
    print @files;
    open FILE,">>direcotry.txt" or die $!;
    print FILE @files;

    (-d $File::Find::name) : this will give you the directories inside the path which you gave at command line . ( you can use -f to find the files)