if ($type eq 'square' or 'Square'){ #is the same as if (($type eq 'square') or ('Square')){ # is the same as if (($type eq 'square') or (1)){ # is the same as if (1) { #You want: if ($type eq 'square' or $type eq 'Square'){ #or if (lc($type) eq 'square') {