It all has to do with compile time and run time. Prototyping has a compile time effect, while the number of elements in an array isn't known till run time. I fail the see the relevancy of your shell example. Prototyping changes the way perl parses Perl. Expecting no changes when using prototypes is a mistake (if you don't want changes, don't change your code! ;-)).