Learning to 'fork()' the right way

2009-03-26 Thread Ron Smith
Hello all, I'd like to learn how to use fork properly. I'm monitoring a running process and when it stops, I use a script to start it. The script will most likely become a cron job. To test everything I created a test script to run as a process which is written as follows: #!/usr/bin/perl us

Re: First attempt at writing simple Module

2009-03-26 Thread Jenda Krynicky
From: "Chas. Owens" > On Wed, Mar 25, 2009 at 00:03, Chap Harrison wrote: > > Hi again, > > > > I'm trying to factor out the declaration and setting of a bunch of variables > > that a suite of programs will need, as well as defining some subroutines > > that will be needed.  I've been mainly refe

Re: Functions passing in arrays

2009-03-26 Thread Chas. Owens
On Thu, Mar 26, 2009 at 20:25, wrote: > Hello > > I have not had a lot of experience with writing functions in > perl. However I am working on a pretty good size script that > could reduce the code size by writing a function that would > pass in 2  arrays, a file handle and a string. The function

Functions passing in arrays

2009-03-26 Thread andrewmchorney
Hello I have not had a lot of experience with writing functions in perl. However I am working on a pretty good size script that could reduce the code size by writing a function that would pass in 2 arrays, a file handle and a string. The function only uses the strings for outputting to the fil

Re: First attempt at writing simple Module

2009-03-26 Thread Chas. Owens
On Thu, Mar 26, 2009 at 14:05, Chap Harrison wrote: snip > This one baffles me.  I still have to explicitly export $g_database_path by > putting it into @EXPORT - what is 'our' doing that 'my' doesn't? snip our and my both create variables. The difference is their scope and their interaction wit

Re: First attempt at writing simple Module

2009-03-26 Thread Chap Harrison
On Mar 25, 2009, at 1:16 AM, Chas. Owens wrote: You need to add the variables you want exported to either @EXPORT (the mandatory list of things to export) or @EXPORT_OK (this list of things to export on demand). The biggest complication is your desire to pass in a variable. This means that we

Re: parser with perl

2009-03-26 Thread dev_null
Thanks for the references. I will check them. > On Thu, Mar 26, 2009 at 09:51, wrote: > > How to achieve a parser with Perl? > > I mean I want to put some logic (if...else, loop etc) in config file and > > let perl to parse them, like TCL for iRules. > snip > > This being Per

Re: parser with perl

2009-03-26 Thread Rodrick Brown
On Thu, Mar 26, 2009 at 9:51 AM, wrote: > How to  achieve a parser with Perl? > I mean I want to put some logic (if...else, loop etc) in config file and let > perl to parse them, like TCL for iRules. > > thanks. > I've used the following in the past and it works very well. http://search.cpan.or

parser with perl

2009-03-26 Thread dev_null
How to achieve a parser with Perl? I mean I want to put some logic (if...else, loop etc) in config file and let perl to parse them, like TCL for iRules. thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl