http://qs321.pair.com?node_id=1145344


in reply to warnings pragma anomaly

Another place where using 1 in void context is commonplace is near/at the end of modules. When use Foo loads Foo.pm, then the last expression evaluated inside Foo.pm better be a true value, to signal that the module loaded succesfully. That's why you usually see the line

1;
near or at the end of a .pm file. Because 1 evaluates to a true value, but is special-cased not to raise a warning.