Re: Need a help on this Script

2005-10-21 Thread John W. Krahn
Mazhar wrote: > Thank You John, > For correcting me in the program with this i have one more doubt, see what > happens if the script runs at 12 am in the morning. Whether the tFrom will > take the previous days 11:30 pm or how exactly it works. What happened when you tried it? > And also give me

Re: killing a program

2005-10-21 Thread Jeff 'japhy' Pinyan
On Oct 21, Christopher Spears said: I've been working on a script that will allow me to kill a certain program using the program's PID. sub findPID { if (my $PID = `pgrep PROGRAM`) { return $PID; } else { return 0; } } pgrep CAN return more

killing a program

2005-10-21 Thread Christopher Spears
I've been working on a script that will allow me to kill a certain program using the program's PID. #!/usr/bin/perl -w use strict; sub findPID { if (my $PID = `pgrep PROGRAM`) { return $PID; } else { return 0; } } my $fPID = &findPID(); if

Re: Removing specific lines from a File

2005-10-21 Thread Jeff 'japhy' Pinyan
On Oct 20, Rose, Jeff said: Basically what I am trying to do here is parse through an email file grab the the basics, from/to/subject put those in a small text tab separated database in the format of File NumRecipients From FromIP Subject Spam-Status and then pass the contents along to spamass

Re: Project planning

2005-10-21 Thread Peter Scott
On Thu, 20 Oct 2005 11:59:08 -0400, Steve Bertrand wrote: > I've been working at an ISP for a few years now, and have been adding > to/modifying their current accounting system since I've got here. Of > course it is all Perl based. > > This isn't a technical problem I'm having, but the system has

RE: why not die?

2005-10-21 Thread Timothy Johnson
In addition to the other answers to your questions, one thing I notice from your code is that you didn't 'use warnings'. You should always turn on warnings, either by adding 'use warnings' or by adding a -w after perl on the shebang line. -Original Message- From: B

Re: why not die?

2005-10-21 Thread Xavier Noria
On Oct 21, 2005, at 8:39, Beast wrote: #!/usr/bin/perl use strict; my $log = '/non/existence/dir/test.log'; my $msg = "test"; &write_log($msg); In addition to the issue with "||" I addressed in another message, please do not use "&" in sub calls unless you know what you are doing (see per