in reply to I dont understand what it is doing....

Well, if you add an ending slash to the substitution inside of map, the code will run, so you can try what it does. I had to remove the test: as well. To see the output, add a similar line:
print $proj,"\n";
However, if you turn warnings on, you will see that prototypes are defined after the sub has been called which means they are ignored.