#!perl use strict; use warnings; use feature qw/say/; use Devel::Peek; my @trailing_truth = ( "0", "0\n", 0, '0', '0'."\n" ); foreach my $zeroe ( @trailing_truth ){ warn $zeroe ? "true\n" : "false\n"; Dump $zeroe; # Dump defined $zeroe; # check the REFCNT! # Dump length $zeroe; # # Dump 0+$zeroe; # numeric coercion # Dump !!$zeroe; # boolean coercion # say "[][][][][][][][][][]\n"; print "\n"; } #### false SV = PV(0x1e850c) at 0x1ea53c REFCNT = 2 FLAGS = (POK,pPOK) PV = 0x26b37bc "0"\0 CUR = 1 LEN = 12 true SV = PV(0x1e851c) at 0x1ea5cc REFCNT = 2 FLAGS = (POK,pPOK) PV = 0x26b381c "0\n"\0 CUR = 2 LEN = 12 false SV = IV(0x1ea618) at 0x1ea61c REFCNT = 2 FLAGS = (IOK,pIOK) IV = 0 false SV = PV(0x1e8534) at 0x1ea64c REFCNT = 2 FLAGS = (POK,pPOK) PV = 0x26b39dc "0"\0 CUR = 1 LEN = 12 true SV = PV(0x1e854c) at 0x1ea66c REFCNT = 2 FLAGS = (POK,pPOK) PV = 0x26b39fc "0\n"\0 CUR = 2 LEN = 12 Press any key to continue . . .