Well, the problem that causes that error is that you have your expressions backward in the chomp. it should be:
chomp($name1=<STDIN>);
You repeat the error throughout the code. But, I can spot a couple of other problems:
in the elsifs you are missing the $ on numPics
your final else is missing the braces around the statement.
use strict would have found all these problems, and is a neccessity for beginning perl programmers.
-pete
"I am Jack's utter lack of disbelief"