mel awaisi wrote: > Hi, > > The problem has been highlighted to me by a great person in this list, but i > just cant solve it. > > I have this script that is not working as it should be. this is what it is > supposed to be doing, take images from a directory (images are coming from > camera) and renames them with the date and time of image. then insert some > meta information into MySQL. what the script is supposed to be doing is to > always keep looking and whenever it finds images to perform the change and > insert. the output is as follow: it only does the process once. > > i would appreciate any help. > > cheers, > Mel > > ----------- > renaming /home/httpd/htdocs/image.jpg to > /home/me/images/2003_03_24_18_14_12.jpg > adding /home/me/images/2003_03_24_18_14_12.jpg to database > [EMAIL PROTECTED] cgi-bin]# size is 196378 > modified is 20030324181412 > filename is 2003_03_24_18_14_12.jpg > Use of uninitialized value in concatenation (.) or string at renamerr.pl > line 99 > . > Failed to get the info > $file is: at renamerr.pl line 99.
In the code you sent, as copied into my editor does not show any code at the line number indicated. My tracing for the error messages indicated that this happens near the end of process(): ... print "adding $new_dir/$stamp.$suffix to database\n"; # This prints fine. my $single_string = $new_dir . '/' . $stamp . '.' . $suffix; infoinsert ($single_string); } It looks like you also call infoinsert after your return form process(): process($check_file) if (-r "$original_dir/$check_file.$suffix"); infoinsert(); This is likely to cause problems. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]