Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: The best "true zero" is...

by ambrus (Abbot)
on Jun 08, 2005 at 11:28 UTC ( #464637=note: print w/replies, xml ) Need Help??


in reply to Re: The best "true zero" is...
in thread The best "true zero" is...

No, it's really the string "0 but true". Try this for example:

use File::Temp; $th = File::Temp::tempfile(undef, "UNLINK", 1); $zbt = + sysseek $th, 0, 0; print $zbt, "\n";

The "E0" suffix appears with the flip-flop operators, but "0E0" can never appear, only "1E0", "2E0" etc.

Replies are listed 'Best First'.
Re^3: The best "true zero" is...
by mce (Curate) on Jun 09, 2005 at 09:08 UTC
    true, but also not true :-)

    Many functions -like the execute function in DBI- return 0E0 when they want to return a result that is ment to be zero but is 'boolean' true in tests

    So, indeed it is not general perl, but it is common to use 0E0 as "zero but true".

    Cheers,


    ---------------------------
    Dr. Mark Ceulemans
    Senior Consultant
    BMC, Belgium

      That's right, but the core perl uses only "0 but true", so "0E0" is not Larry's.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://464637]
help
Chatterbox?
[stevieb]: Corion: the problem with that is the 2.36 represents the underlying C library I've wrapped, which is why I want to use incrementals after the real version number. I've emailed modules@ to see if they can expedite the process for me...
[stevieb]: ...as normally, it takes three days to delete, in case you want to change your mind

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2017-01-19 15:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (170 votes). Check out past polls.