Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: tlug: When Perl can't open it can it mail it?
- To: tlug@example.com
- Subject: Re: tlug: When Perl can't open it can it mail it?
- From: Scott Stone <sstone@example.com>
- Date: Fri, 2 Oct 1998 18:41:59 +0900 (JST)
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- In-Reply-To: <3.0.6.32.19981002120401.009b2350@example.com>
- Reply-To: tlug@example.com
- Sender: owner-tlug@example.com
On Fri, 2 Oct 1998, Darren Cook wrote: > This is from a PERL4 script that writes to a log file: > > --------- > unless (open(FOUT,">>$file")) { > #Report error here > return; > } > #Write here > close(FOUT); > ----------- > > Is it possible to have it write the information to an email when it can't > open the file? Eg. something like this: > > ----------- > unless (open(FOUT,">>$file")) { > open(FOUT,"|sendmail darren"); > print FOUT "Subject: Perl script couldn't open $file \n\n"; > #Fall through > } > #Write here > close(FOUT); > ----------- That looks like it should work. > > Are there any security issues I need to be aware of here? > well, make sure that nobody but you can write to the script... > Darren > > --------------------------------------------------------------- > Next Meeting: 10 October, 12:30 Tokyo Station Yaesu central gate > Featuring the IMASY Eng. Team on "IPv6 - The Next Generation IP" > Next Nomikai: 20 November, 19:30 Tengu TokyoEkiMae 03-3275-3691 > --------------------------------------------------------------- > Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp > -------------------------------------------------- Scott M. Stone <sstone@example.com, sstone@example.com> <sstone@example.com> Head of TurboLinux Development/Systems Administrator Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan) http://www.pht.com http://armadillo.pht.co.jp http://www.pht.co.jp http://www.turbolinux.com --------------------------------------------------------------- Next Meeting: 10 October, 12:30 Tokyo Station Yaesu central gate Featuring the IMASY Eng. Team on "IPv6 - The Next Generation IP" Next Nomikai: 20 November, 19:30 Tengu TokyoEkiMae 03-3275-3691 --------------------------------------------------------------- Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp
- References:
- tlug: When Perl can't open it can it mail it?
- From: Darren Cook <darren@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: tlug: netscape-glibc
- Next by Date: Re: tlug: netscape-glibc
- Prev by thread: Re: tlug: When Perl can't open it can it mail it?
- Next by thread: tlug: About Oracle on Linux
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links