Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^5: The True but Zero value?

by choroba (Cardinal)
on Mar 22, 2016 at 17:15 UTC ( [id://1158519]=note: print w/replies, xml ) Need Help??


in reply to Re^4: The True but Zero value?
in thread The True but Zero value?

Not only DBI. The E0 is documented in perlop at the flip flop:
#!/usr/bin/perl use warnings; use strict; while (<DATA>) { if (my $flipflop = /start/ .. /end/) { print "$flipflop: $_"; } } __DATA__ before start 1 2 3 end after

Output:

1: start 2: 1 3: 2 4: 3 5E0: end
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^6: The True but Zero value?
by Marshall (Canon) on Mar 23, 2016 at 17:29 UTC
    Yes, this is quite correct although here the string "5E0" is meaning something different that "zero but true". Here it means "hey, this is a special kind of Five!". But we get the same idea of expressing 2 things with a single return value. Here the idea expressed is that this is the "END" and the END value is 5.

    E0 means 10**0 which is "1" numerically.
    So, 5E0 is a way of saying 5*1.
    The E0 means that this is a "special Five" and indeed it is with the flip-flop operator.

    0E0 is way of saying "0*1". And that this is a special zero.
    demerphq pointed out that 0E5 is also zero, the exponent doesn't matter. This means 0 * 10**5. However I see a certain simplicity to E0 (10**0)== 1.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1158519]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-03-29 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found