Multiline matching

2003-07-03 Thread mark sony
Hi all, I am writing a program which will print variety of matches having keywords like insert,delete etc from another file .For this I wrote a couple of sub routines one of which returns an array(having the comments removed ).Then I face the problem : A part of that array is : CURSOR c_efc(l_w

Running process in background?

2003-07-03 Thread Scot Robnett
I'm setting up a mailing subroutine for one of my customers that will send mail based upon a delay of X amount of hours (selected via web form). If I use something like: sub send_on_schedule { my $hours = $q->param('delay'); my $sleeptime = $hours * 3600; # how many seconds? my @addres

RE: Running process in background?

2003-07-03 Thread Hanson, Rob
Your first solution is prone to memory leaks and your second is just a pain (INHO). > Is there a third alternative? Sure. Create a cron that runs every hour (or less) and checks for scheduled mail to send. All you need to do is have some sort of persistant storage (file or preferably a DB) to s

RE: Running process in background?

2003-07-03 Thread Scot Robnett
I sort of follow you, but I'm not exactly sure how to implement something like that. How would a cron know by looking at a text file or DB entry when it was supposed to send the mail? Has anyone done anything like this, and are there code samples available somewhere that I can review? - Scot R

RE: Running process in background?

2003-07-03 Thread Hanson, Rob
> How would a cron know by looking at a text > file or DB entry when it was supposed to > send the mail? The cron doesn't look at the DB... your scheduler script does (which is started by cron). The scheduler might do something like this: 1. open the database 2. search for records with a "to_sen

question on global variable / scope

2003-07-03 Thread David Granas
Hi, Im just learning Perl and was a little confused with why I couldnt prevent my subroutines from reading variables from the main program. Here is an example: use strict; my $var = 1; test(); sub test { print $var; } I had thought that a my variable would not be able to be read by the

Re: Running process in background?

2003-07-03 Thread Octavian Rasnita
Can you tell me how to define a cron job that is executed each hour? Thank you. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "Hanson, Rob" <[EMAIL PROTECTED]> To: "'Scot Robnett'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, J

need help

2003-07-03 Thread mark sony
Hi all, I am writing a program which will print variety of matches having keywords like insert,delete etc from another file .For this I wrote a couple of sub routines one of which returns an array(having the comments removed ).Then I face the problem : A part of that array is : CURSOR c_efc(l_wor