Re: Is this correct in perl?

2006-04-11 Thread Dr.Ruud
Chad Perrin schreef: > Jay Savage: >> The dreaded reply-to strikes again... > > Did I miss something somewhere that explains why this list uses a > list-reply instead of reply-to? Or use news://nntp.perl.org/perl.beginners (yes, it supports posting too) -- Affijn, Ruud "Gewoon is een tijger

Re: Is this correct in perl?

2006-04-10 Thread Chad Perrin
On Mon, Apr 10, 2006 at 06:01:41AM -0700, Randal L. Schwartz wrote: > > That's why I pointed it out. One advantage of having looked at nearly every > Unix version since V6 in 1977 is that I have a pretty good idea of just how > un-universal "every Unix does $x" actually is. :) It's always nice t

Re: Is this correct in perl?

2006-04-10 Thread Chad Perrin
On Mon, Apr 10, 2006 at 09:55:43AM -0400, Jay Savage wrote: > The dreaded reply-to strikes again... Did I miss something somewhere that explains why this list uses a list-reply instead of reply-to? -- Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ] unix virus: If you're using a unixlike

Re: Is this correct in perl?

2006-04-10 Thread Jay Savage
The dreaded reply-to strikes again... On 4/9/06, Jay Savage <[EMAIL PROTECTED]> wrote: > On 4/9/06, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > > On Sun, 2006-09-04 at 11:52 -0700, Randal L. Schwartz wrote: > > > Huh? What UNIX system does this? > > > > Ubuntu > > > >

Re: Is this correct in perl?

2006-04-10 Thread Randal L. Schwartz
> "Chad" == Chad Perrin <[EMAIL PROTECTED]> writes: Chad> It may have been added with Debian, but I don't think so. I think it's Chad> at least a Linux-wide behavior. I seem to have a vague recollection of Chad> SuSE doing the same thing, for instance -- though I could just be Chad> misremem

Re: Is this correct in perl?

2006-04-10 Thread Chad Perrin
On Sun, Apr 09, 2006 at 02:59:54PM -0700, Randal L. Schwartz wrote: > > "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 m

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: 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: 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
> ""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 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 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 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

Re: Is this correct? print syntax

2002-10-13 Thread Jeff 'japhy' Pinyan
On Oct 11, Michael Fowler said: >> if (condition) { >> print FILEHANDLE list, of, stuff; >> next; >> } > >I agree. It's much more readable. I rarely do that. Unless the body of the block is going to be enormous, I do it without the block. However, I think print(FOO @list) looks real

Re: Is this correct? print syntax

2002-10-13 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Michael Fowler) writes: >On Fri, Oct 11, 2002 at 01:50:53PM -0500, James Edward Gray II wrote: >> It's the indirect method call syntax, as far as I understand. > >It looks like it, but it isn't. See >http:[EMAIL PROTECTED]/msg33969.html for a re

Re: Is this correct? print syntax

2002-10-13 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jeff 'Japhy' Pinyan) writes: > >>> if (condition) { >>> print FILEHANDLE list, of, stuff; >>> next; >>> } >> >I rarely do that. Unless the body of the block is going to be enormous, I >do it without the block. However, I think print(FOO

Re: Is this correct? print syntax

2002-10-12 Thread Michael Fowler
On Fri, Oct 11, 2002 at 01:50:53PM -0500, James Edward Gray II wrote: > It's the indirect method call syntax, as far as I understand. It looks like it, but it isn't. See http:[EMAIL PROTECTED]/msg33969.html for a recent discussion on that. > Personally though, I wouldprefer to see your example

Re: Is this correct? print syntax

2002-10-12 Thread James Edward Gray II
On Friday, October 11, 2002, at 05:01 PM, Michael Fowler wrote: > On Fri, Oct 11, 2002 at 01:50:53PM -0500, James Edward Gray II wrote: >> It's the indirect method call syntax, as far as I understand. > > It looks like it, but it isn't. See > http:[EMAIL PROTECTED]/msg33969.html for a > recent

RE: Is this correct? print syntax

2002-10-11 Thread david
Nikola Janceski wrote: > I need them.. for > > > print FILEHANDLE (list, of, stuff), next if (condition); > you probably just want: print FILEHANDLE qw(list of stuff) and next if(condition); david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

Re: Is this correct? print syntax

2002-10-11 Thread Larry Coffin
At 3:05 PM -0400 10/11/02, James Edward Gray II wrote: >>> print FILEHANDLE (list, of, stuff), next if (condition); >> >> print FILEHANDLE (list, of, stuff); >> next if (condition); >But these two examples don't behave the same. The first one prints >and calls next, only on the condition. T

Re: Is this correct? print syntax

2002-10-11 Thread Paul Johnson
On Fri, Oct 11, 2002 at 02:57:21PM -0400, Larry Coffin wrote: > >print FILEHANDLE (list, of, stuff), next if (condition); > > Why are you using a comma operator here and not just a semi-colon > to terminate the print statement? I.e. why not: > > print FILEHANDLE (list, of, stuff); > next

Re: Is this correct? print syntax

2002-10-11 Thread Steve Grazzini
Nikola Janceski <[EMAIL PROTECTED]> wrote: > Is this correct placement of the parenthesis? > > print FILEHANDLE (list_of_print_stuff); > Not really. It will usually work, but the FILEHANDLE is the first argument, so it ought to be: print(FH "foo", "bar"); -- Steve perldoc -qa.j | perl -

Re: Is this correct? print syntax

2002-10-11 Thread James Edward Gray II
On Friday, October 11, 2002, at 01:57 PM, Larry Coffin wrote: >> print FILEHANDLE (list, of, stuff), next if (condition); > > print FILEHANDLE (list, of, stuff); > next if (condition); > > In both cases, the return value of print() is getting tossed and > the 'next if (...)' is not depend

RE: Is this correct? print syntax

2002-10-11 Thread Jeff 'japhy' Pinyan
On Oct 11, Nikola Janceski said: >print(FILEHANDLE list, of, stuff, to, print), next if (condition); > >which I haven't tested. and do I need another comma in that?... ;) just >fueling the fire I guess. That is what you need. print (FH @args), next if condition; And no, do NOT put a comma af

Re: Is this correct? print syntax

2002-10-11 Thread Tim Musson
Hey Nikola, My MUA believes you used Internet Mail Service (5.5.2650.21) to write the following on Friday, October 11, 2002 at 2:40:28 PM. NJ> I need them.. for NJ> print FILEHANDLE (list, of, stuff), next if (condition); This type of thing is common in my code when I am messing aroun

Re: Is this correct? print syntax

2002-10-11 Thread James Edward Gray II
On Friday, October 11, 2002, at 01:45 PM, Tim Musson wrote: > use strict; > use warnings; > print (list_of_print_stuff); # This gives an error I don't get any error with this, assuming I either make it a proper declared variable or quote it, in Perl 5.6.0. It's never wrong to use parenthesis

RE: Is this correct? print syntax

2002-10-11 Thread Larry Coffin
>print FILEHANDLE (list, of, stuff), next if (condition); Why are you using a comma operator here and not just a semi-colon to terminate the print statement? I.e. why not: print FILEHANDLE (list, of, stuff); next if (condition); In both cases, the return value of print() is gett

RE: Is this correct? print syntax

2002-10-11 Thread Nikola Janceski
he fire I guess. > -Original Message- > From: Tim Musson [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 11, 2002 2:46 PM > To: [EMAIL PROTECTED] > Subject: Re: Is this correct? print syntax > > > Hey Nikola, > > My MUA believes you used Internet Mail Serv

Re: Is this correct? print syntax

2002-10-11 Thread Tim Musson
Hey Nikola, My MUA believes you used Internet Mail Service (5.5.2650.21) to write the following on Friday, October 11, 2002 at 2:28:27 PM. NJ> Is this correct placement of the parenthesis? NJ> print FILEHANDLE (list_of_print_stuff); The best thing to do is look at perldoc, and try it

Re: Is this correct? print syntax

2002-10-11 Thread James Edward Gray II
2 2:39 PM >> To: Nikola Janceski >> Cc: Beginners (E-mail) >> Subject: Re: Is this correct? print syntax >> >> >> Parenthesis are optional for pre-defined subroutines, like Perl's >> built-in, so most users just leave them off when they're not need

RE: Is this correct? print syntax

2002-10-11 Thread Nikola Janceski
I need them.. for print FILEHANDLE (list, of, stuff), next if (condition); > -Original Message- > From: James Edward Gray II [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 11, 2002 2:39 PM > To: Nikola Janceski > Cc: Beginners (E-mail) > Subject: Re: Is this cor

Re: Is this correct? print syntax

2002-10-11 Thread James Edward Gray II
Parenthesis are optional for pre-defined subroutines, like Perl's built-in, so most users just leave them off when they're not needed: print FILEHANDLE list, of stuff, to print; On Friday, October 11, 2002, at 01:28 PM, Nikola Janceski wrote: > Is this correct placement of the parenthesis? >

RE: Is this correct

2001-06-25 Thread Chas Owens
On 25 Jun 2001 09:41:58 +0100, Govinderjit Dhinsa wrote: > One question please, I want to search for M and A, at the moment I am > only searching for M (as below) > if ($fields[14] =~ /M/) > > Would the example below be correct please; > if ($fields[14] =~ /\M\|\A\/) > > > Your help i

Re: Is this correct

2001-06-25 Thread Jos Boumans
You could do 2 things: either say: if ($fields[14] =~ /[AM]/) or if ($fields[14] =~ /M|A/) the first uses a character class, the second a simple boolean 'or' hth, Jos Boumans Govinderjit Dhinsa wrote: > One question please, I want to search for M and A, at the moment I am > only searc

RE: Is this correct

2001-06-25 Thread Govinderjit Dhinsa
One question please, I want to search for M and A, at the moment I am only searching for M (as below) if ($fields[14] =~ /M/) Would the example below be correct please; if ($fields[14] =~ /\M\|\A\/) Your help is much APPRECIATED > Kind Regards, > GD >