Help for this page

Select Code to Download


  1. or download this
    print defined($count) ? ("=") x (10-$count)
                          : "Undefined count.\n";
    
  2. or download this
    print defined($count) ? substr("==========", $count) 
                          : "Undefined count.\n";
    
  3. or download this
    print defined($count) ? ("=") x (10-$count) 
                          : "Undefined count.",
    ...
    print defined($count) ? substr("==========", $count) 
                          : "Undefined count.",
          "\n";
    
  4. or download this
    print defined($count) ? ("=") x (10-$count) : "Undefined count.", "\n"
    +;
    print defined($count) ? substr("==========", $count) : "Undefined coun
    +t.", "\n";
    
  5. or download this
    if (! defined $count) { print "Undefined count.\n" }
    else                  { print substr("==========", $count) }
    
  6. or download this
    print "You bought $qty item", $qty>1 ? "s" : "", " today!\n";
    
  7. or download this
    my $item = $qty > 1 ? "items"
                        : "item";
    ...
    $when = "yesterday" if $purchase_date == $yesterday;
    
    print "You bought $num $item $when!\n";