Re: hash value and grep / get some files searched and indexed

2006-04-09 Thread Alan_C
On Saturday 08 April 2006 01:08, Alan_C wrote: > On Friday 07 April 2006 03:34, John W. Krahn wrote: > > Alan_C wrote: > > > Hi, > > > > Hello, Hi. Thanks for the help. I've got a (Linux platform) working solution with the improvements that I mentioned are onto it. When searching (enter on com

Re: Is this correct in perl?

2006-04-09 Thread Mr. Shawn H. Corey
On Sun, 2006-09-04 at 12:52 +0800, Practical Perl wrote: > Hello, > > When I receive a signal (for example,TERM or INT) from terminal,I want to > get the process exit immediately.But the process have some childs running,so > he would tell the childs to exit before he exit.So I write a kill stateme

hash and parsing help

2006-04-09 Thread Saurabh Singhvi
Hi I have generated a hash from data 3 levels deep meaning, $hash{$key1}{$key2}{$integer} is how i would get a value. for each key2 there are some no. of values which are same in number for all keys under one key1 but may be different under other key1's. Now the data values are of the form :

Re: Is this correct in perl?

2006-04-09 Thread Dr.Ruud
Mr. Shawn H. Corey schreef: > You could do it this way: > > END { > kill TERM, keys %childs; > } > > which will kill the child processes regardless of how the program > ended; with the exception of `kill 9`, of course. If the childs stopped earlier, and their PIDs got reused, you would ki

Re: Is this correct in perl?

2006-04-09 Thread Mr. Shawn H. Corey
On Sun, 2006-09-04 at 18:10 +0200, Dr.Ruud wrote: > If the childs stopped earlier, and their PIDs got reused, you would kill > wrong processes in this way. That's why you have to keep accurate track of which processes are yours. Most of the time this is not a problem since the PIDs will only get r

Re: Is this correct in perl?

2006-04-09 Thread Randal L. Schwartz
> ""Mr" == "Mr Shawn H Corey" <[EMAIL PROTECTED]> writes: "Mr> That's why you have to keep accurate track of which processes are yours. "Mr> Most of the time this is not a problem since the PIDs will only get "Mr> recycled some 60_000 processes later. Unless your Perl program runs all "Mr> the

Re: Is this correct in perl?

2006-04-09 Thread Mr. Shawn H. Corey
On Sun, 2006-09-04 at 11:52 -0700, Randal L. Schwartz wrote: > Huh? What UNIX system does this? Ubuntu >From man signal: Signal Value Action Comment - SIGHUP1

Re: Is this correct in perl?

2006-04-09 Thread Randal L. Schwartz
> "Shawn" == Shawn H Corey <[EMAIL PROTECTED]> writes: Shawn> On Sun, 2006-09-04 at 11:52 -0700, Randal L. Schwartz wrote: >> Huh? What UNIX system does this? Shawn> Ubuntu >> From man signal: Shawn>Signal Value Action Comment Shawn>

Re: hash and parsing help

2006-04-09 Thread John Ackley
to recurse through the values for $key1 (keys %hash) { for $key2 (keys %{$hash{$key1}}) { for $integer (keys %{$hash{$key1}{$key2}} ) { print "\$hash{$key1}{$key2}{$integer} = $hash{$key1}{$key2}{$integer}\n"; } } } -- To unsubscribe, e-mail: [EMAIL PROTE

Re: Is this correct in perl?

2006-04-09 Thread Jeff Pang
> >You could do it this way: > > END { >kill TERM, keys %childs; > } > >which will kill the child processes regardless of how the program ended; >with the exception of `kill 9`, of course. > No,I think it's not so right here. Under your statement,when all childs exited,they also send a SIGT

Re: hash value and grep / get some files searched and indexed

2006-04-09 Thread John W. Krahn
Alan_C wrote: > > Hi. Hello, > Thanks for the help. I've got a (Linux platform) working solution with > the improvements that I mentioned are onto it. > > When searching (enter on commandline) multiple words it can print out several > listings of the same xtst file due to I use some cross re

executing/calling another perl script

2006-04-09 Thread Irfan J Sayed
Hi All, I need to call/execute another perl file from my backup.pl perl script by giving some argument. Can anybody please tell me how to do that? Regards Irfan Sayed

RE: executing/calling another perl script

2006-04-09 Thread Bobby Jafari
> I need to call/execute another perl file from my backup.pl perl script by giving some argument. > Can anybody please tell me how to do that? my result = system (perl other-script.pl ) or my result = `perl other-script.pl ` #using back ticks` -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Re: executing/calling another perl script

2006-04-09 Thread Anish Kumar K.
Hi Irfan Create a perl Module. The Module should start with and should be the second line after ther perl path package ; sub function_name { my ($pas1,$pass2,$array,$return)[EMAIL PROTECTED]; Do the Processing $_[3]= Send the Value..>Can be anything array, hash, or...$; } In the PERL

RE: executing/calling another perl script

2006-04-09 Thread Irfan J Sayed
Thanks for all your help. Regards Irfan Sayed

[Subroutine Optimization] Shift vs. @_

2006-04-09 Thread Adam W
Hello List, I was wondering when it is appropriate to do multiple shifts on parameters passed to a subroutine and when it is appropriate to just feed it @_. For example, you have: &fancy_sub($a, $b, $c, @d); Is it better (I'm leaving this term vague on purpose) to write: sub fancy_sub {