Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Can I clean this up??

by tadman (Prior)
on Jul 24, 2002 at 11:12 UTC ( [id://184771]=note: print w/replies, xml ) Need Help??

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"));
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-18 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found