in reply to why do some perl files end with 1;

A module that is useed or required by other perl code needs to return a true value.

That's what the 1; is for. See perlmod for details.