How to use two or more question in function if ?

Discussion in 'Perl Misc' started by Tamara, May 8, 2004.

  1. Tamara

    Tamara Guest

    How to use two or more question in function if ?
    E.g.
    If a=0 and b=20 then print "a=o and b=20"
     
    Tamara, May 8, 2004
    #1
    1. Advertising

  2. Tamara wrote:

    > How to use two or more question in function if ?
    > E.g.
    > If a=0 and b=20 then print "a=o and b=20"


    print "a=0 and b=20" if $a==0 && $b==20

    gtoomey
     
    Gregory Toomey, May 8, 2004
    #2
    1. Advertising

  3. Tamara

    Tore Aursand Guest

    On Sat, 08 May 2004 05:28:25 +0200, Tamara wrote:
    > How to use two or more question in function if ?
    > E.g.
    > If a=0 and b=20 then print "a=o and b=20"


    Why do you want to write 'a=o'? It would have made more sense if you
    would write 'a=0';

    if ( $a == 0 and $b == 0 ) {
    print 'a=o and b=20';
    }


    --
    Tore Aursand <>
    "There are three kinds of lies: lies, damn lies, and statistics."
    (Benjamin Disraeli)
     
    Tore Aursand, May 9, 2004
    #3
    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. Michael
    Replies:
    4
    Views:
    468
    Matt Hammond
    Jun 26, 2006
  2. GenxLogic
    Replies:
    3
    Views:
    1,371
    andrewmcdonagh
    Dec 6, 2006
  3. Robert Klemme

    With a Ruby Yell: more, more more!

    Robert Klemme, Sep 28, 2005, in forum: Ruby
    Replies:
    5
    Views:
    237
    Jeff Wood
    Sep 29, 2005
  4. Robert Wallace

    substitute two ore more with two or more

    Robert Wallace, Dec 31, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    115
    Big and Blue
    Dec 31, 2003
  5. Bob Rashkin
    Replies:
    5
    Views:
    100
    Dennis Lee Bieber
    Dec 23, 2013
Loading...

Share This Page