I_love_perl has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I've a pm file which has a static hash like this
use strict; use warnings; %hash = ( "one" => "1", "two" => "2", "one" => "3", );
Here the key "one" is repeated.When I do a perl -c file.pm, it compiles fine.
Is there any way to invoke perl to throw an error(or warning) during the compilation in case of usage of duplicate keys in the hash ?
Back to
Seekers of Perl Wisdom