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

When a module is loaded (via use) the compiler will complain unless the last statement executed when it is loaded is true.

For that reason, Perl modules end with 1;