in reply to Getting path from file

perl -e '$kwords="test"; $temp="/tmp/db.tmp";open LIST, ">$kwords"; while(<$path/*>){next if m#$path/database.txt$#;open DBASE,"$path/database.txt"; @dbase=<DBASE>; open TEMP, ">$temp" or die; $,=$/; print TEMP @dbase; foreach(@dbase){open XFILE, $_ or die; print LIST <XFILE>}}'