Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Conditional style (if, &&) query

by petdance (Parson)
on Oct 17, 2001 at 08:04 UTC ( [id://119326]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ( $obj->show_phone ) {
        $obj->print_phone_number;
    }
    
  2. or download this
    # Validate the phone according to basic U.S. rules
    if ( $phone =~ s/^(1-)?(\d\d\d-?\d\d\d-?\d\d\d\d)$/ ) {
    ...
    if ( $obj->show_phone ) {
        $obj->print_phone_number;
    }
    
  3. or download this
    $obj->print_name;
    $obj->print_address;
    $obj->print_phone_number if $self->showphone;
    $obj->print_email_address;
    
  4. or download this
    $obj->print_name;
    $obj->print_address;
    ...
        $self->print_phone_number;
    }
    $obj->print_email_address;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-26 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found