Help for this page

Select Code to Download


  1. or download this
    if ($ct > 0)
    {
         open(FIL, ">>$myfil") || die "Write to $myfil failed\n";
    ...
    
         system("mailx -s 'Mail Header' myemail < $myfil");
    }
    
  2. or download this
    print "\$foo is ";
    print $foo? "true" : "false";
    print "\n";
    
  3. or download this
    print "\$foo is ",($foo? "true" : "false"),"\n";
  4. or download this
    print "There ",(($num == 1)? "is" : "are")," $num camel",
           (($num == 1)? "" : "s")," for sale.\n";
    
  5. or download this
    printf("There %s $num camel%s for sale.\n",
           ($num == 1)? ("is","") : ("are","s"));