(Perl) prototypical value checking