Apart from that, you're doing $data_path = s/[\n\r]//g; which seems unnecessary -- you already chopped it in the loop above, and it's just a line of output from "ls".foreach $loop (sort `cd $data_dir; ls -d *`) { chop($loop); foreach $loop2 (sort `cd $data_dir; ls -d $loop/*`) { chop($loop2); ### foreach $loop3 (sort `cd $data_dir; ls -d $loop2/*`) { ## should be: ## foreach $loop3 (sort `cd $data_dir/$loop; ls -d $loop2/*`) { ## or: foreach $loop3 (sort `cd $data_dir; ls -d $loop/$loop2/*`) { chop($loop3); ## BTW, this: $all_files[$i++]=$loop3; ## should be: push( @all_files, $loop3 ); } } }
Then you're splitting $data_path on slash characters, which would never be present in $data_path given the code as posted, so $blank and $file are always empty strings, I think.
I didn't see where &get_key_field() is defined; are you confident about what it's return value is, or should you be testing that?
I'm sorry if this is all peripheral to the real problem, but I think it's worth looking into -- try "perl -d" on the script, set some breakpoints at key lines, and step through it to see whether the values of the variables match your expectations.
In reply to Re: Error creating database file
by graff
in thread Error creating database file
by krivenburg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |