If your perl is 5.6 or later then put in 'use warnings;', if earlier (or if you need to be backward compatible), then '-w' after the 'perl' on the first line.
see
perlrun for -w and
perlvar for the related $^W, or 'perldoc warnings' and 'perldoc perllexwarn' for 'use warnings;'.