A small question

Discussion in 'Perl Misc' started by blaq.box@gmail.com, Jan 17, 2005.

  1. Guest

    hi all

    this is my first post to this group.
    i have just started learning perl and
    i am really amazed to find (infact couldn't find) that no keywords like
    'true' or 'false' exist for perl. as we see in C/C++ etc.
    experts please ensure me if i am right?

    thanks for your time

    blaq
    , Jan 17, 2005
    #1
    1. Advertising

  2. In article <> posted
    on Sun, 16 Jan 2005 20:27:13 -0800, blaq.box wrote:

    > this is my first post to this group.
    > i have just started learning perl and


    The name of the language is Perl.

    > i am really amazed to find (infact couldn't find) that no keywords like
    > 'true' or 'false' exist for perl. as we see in C/C++ etc. experts please
    > ensure me if i am right?


    C does not have keywords true and false.

    You might want to head on over to <http://learn.perl.org/> for resources
    for beginners.

    Sinan
    --
    A. Sinan Unur
    d -- remove invalid and
    reverse each component for email address.
    A. Sinan Unur, Jan 17, 2005
    #2
    1. Advertising

  3. wrote:

    > this is my first post to this group.


    Welcome aboard. If you haven't done so already, please have a look at the
    posting guidelines that appear here often. No, you haven't done anything
    wrong, that's just a generic comment. :)

    > i am really amazed to find (infact couldn't find) that no keywords like
    > 'true' or 'false' exist for perl. as we see in C/C++ etc.
    > experts please ensure me if i am right?


    Well, you're right about Perl - it doesn't have 'true' or 'false' keywords.
    C++ does, but C doesn't. C99 defines them as macros.

    In C/C++, zero is false, non-zero is true. A NULL pointer is zero, so any
    string is true. In Perl, as stated in 'perldoc perlsyn', "The number 0, the
    strings '0' and '', the empty list (), and undef are all false in a boolean
    context. All other values are true."

    sherm--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
    Sherm Pendley, Jan 17, 2005
    #3
  4. Guest

    thanks to you all people for correcting & clearifying me.

    blaq
    , Jan 18, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. moonlight

    small question

    moonlight, Jan 15, 2006, in forum: VHDL
    Replies:
    1
    Views:
    435
  2. Dave
    Replies:
    0
    Views:
    451
  3. =?Utf-8?B?a2lzaG9y?=

    Small Question

    =?Utf-8?B?a2lzaG9y?=, Aug 18, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    340
    =?Utf-8?B?a2lzaG9y?=
    Aug 19, 2005
  4. Tommy
    Replies:
    2
    Views:
    345
    John C. Bollinger
    Nov 22, 2004
  5. =?Utf-8?B?TXIuIE11cmFkIEphbWFs?=

    small question

    =?Utf-8?B?TXIuIE11cmFkIEphbWFs?=, May 3, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    388
    Swanand Mokashi
    May 3, 2006
Loading...

Share This Page