use Data::Dumper; for (0, '', '0', '00', '0.0', '0.00', undef) { print (($_? 'TRUE' : 'FALSE'), ': ', Dumper($_)); }