in reply to Check that a value has been assigned to a variable when uploading a photo
Hello. I would first try to use Data::Dumper to print the contents of $filename and see if it is doing what you think it is. you could also try if (length($filename) == 0) {..do stuff..;}