Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Can I clean this up??

by ackohno (Scribe)
on Jul 24, 2002 at 10:52 UTC ( #184763=note: print w/replies, xml ) Need Help??


in reply to Can I clean this up??

open(FIL,">>$myfil") || die "No open for ct tot: $! \n"; if($ct == 1) { print FIL "\n$ct is down at this time.\n"; } elsif($ct >= 2) { print FIL "\n$ct are not available at this time.\n"; } system("mailx -s 'Mail header' myemail < $myfil"); close(FIL);
That should function the same without repeating the opening, mailing, closeing.

Notice: At the time I was writeing this response frankus was writeing it too and beat me to submiting, heh. sorry for repeating.
--
($good, $bad, $ugly) = split(/,/, "vi,emacs,teco")

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2023-03-28 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (66 votes). Check out past polls.

    Notices?