Cool/useful short examples of Perl?
matt.lawrence at virgin.net
Thu Jun 9 10:26:22 BST 2011
On 08/06/11 18:19, Philip Newton wrote:
> On Wed, Jun 8, 2011 at 15:37, Matt Lawrence<matt.lawrence at virgin.net> wrote:
>> Perl's canonical true and false are 1 and '' respectively
> Is that so? How would one find that out?
> Dump-ing 4==4 and 4==5 with Devel::Peek implies to me that true and
> false are PVNVs with integer, floating-point, and string values filled
> simultaneously, so I'm not sure how any of the three fields could be
> considered "the" value of those, er, values(?).
Isn't that true of all scalars, under the hood? All I meant was:
$ perl -le 'print "\x27$_\x27" for 1 == 1, 1 == 0'
More information about the london.pm