OK, I'm getting closer. I changed the line above of print $file->name, " created\n"; to print $file->files_created, " created\n";
and now it is printing the newly created file. Now I am having a problem getting the name of that file saved as a variable. I'm not experienced enough to understand how this thing works. I thought I could just do this:
$new_file = $file->files_created
But that doesn't work. How can I save that to a variable that I can work with?