I stripped out your front matter (everything from "my ($buffer)up to the commented out prints of your first and second choices) and ran it with fixed values ("fred" and "bob") for $firstChoice and $secondChoice and uncommented your second try (the "mv" command), and it worked fine, once I made the dynamics directory.
So if you uncomment your debug code to print the $firstChoice and $secondChoice and there's something in them, you should get something that works. Have you checked that you can create files manually in the directory where you want to create them?
Why isn't yours working? My first guess would be a permissions problem for the destination directory. Do you need to do a mkdir to create the destination directory (I didn't do that before the first time I ran your code and got an error back)