[24853] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 7104 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 14 09:18:41 2004

Date: Tue, 14 Sep 2004 06:17:03 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 14 Sep 2004     Volume: 10 Number: 7104

Today's topics:
    Re: - Sept112001A.mp3 (00/80) 0911A <eam@7ka.mipt.ru>
    Re: killing a process using its PID <peters@invalid.invalid>
    Re: killing a process using its PID <es@yahoo.fedeabascal>
    Re: newbie question <tintin@invalid.invalid>
    Re: Problem with global text search using Regular Expre <daveandniki@ntlworld.com>
    Re: Problem with global text search using Regular Expre (Anno Siegel)
    Re: Problem with global text search using Regular Expre <1usa@llenroc.ude.invalid>
    Re: Problem with global text search using Regular Expre (Anno Siegel)
    Re: Xah Lee's Unixism jmfbahciv@aol.com
    Re: Xah Lee's Unixism jmfbahciv@aol.com
    Re: Xah Lee's Unixism jmfbahciv@aol.com
    Re: Xah Lee's Unixism jmfbahciv@aol.com
    Re: Xah Lee's Unixism <gregm-news@toadmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 14 Sep 2004 13:08:47 +0300
From: "Eugene Mikheyev" <eam@7ka.mipt.ru>
Subject: Re: - Sept112001A.mp3 (00/80) 0911A
Message-Id: <ci6fvj$1hsn$1@news.univ.kiev.ua>

> You must have lost your mind!
I bet he did




------------------------------

Date: Tue, 14 Sep 2004 22:22:42 +1200
From: "Peter Sundstrom" <peters@invalid.invalid>
Subject: Re: killing a process using its PID
Message-Id: <2qnv2cF11hk1lU1@uni-berlin.de>


"Federico" <es@yahoo.fedeabascal> wrote in message
news:ci48s9$og6$2@nsnmrro2-gest.nuria.telefonica-data.net...
> Federico wrote:
>
> > Hello,
> >
> > I want my perl script to be able to kill a process given its pid. I
> > could invoque the UNIX kill -9, but I would prefer something provided by
> > the perl language.
> > Is there something in perl for this?
>
> sorry, I found it immediately after sending the message.
> It is the "kill" function.

Sorry, too late to earn yourself an entry in the Perl SAQ.
http://www.ginini.com/perlsaq.html




------------------------------

Date: Tue, 14 Sep 2004 13:14:55 +0200
From: Federico <es@yahoo.fedeabascal>
Subject: Re: killing a process using its PID
Message-Id: <ci6jv4$fi7$1@nsnmrro2-gest.nuria.telefonica-data.net>

Peter Sundstrom wrote:

> "Federico" <es@yahoo.fedeabascal> wrote in message
> news:ci48s9$og6$2@nsnmrro2-gest.nuria.telefonica-data.net...
> 
>>Federico wrote:
>>
>>
>>>Hello,
>>>
>>>I want my perl script to be able to kill a process given its pid. I
>>>could invoque the UNIX kill -9, but I would prefer something provided by
>>>the perl language.
>>>Is there something in perl for this?
>>
>>sorry, I found it immediately after sending the message.
>>It is the "kill" function.
> 
> 
> Sorry, too late to earn yourself an entry in the Perl SAQ.
> http://www.ginini.com/perlsaq.html

no problem. It's a funny page.


------------------------------

Date: Tue, 14 Sep 2004 22:27:45 +1200
From: "Tintin" <tintin@invalid.invalid>
Subject: Re: newbie question
Message-Id: <2qnvbrF11ec9aU1@uni-berlin.de>


"krakle" <krakle@visto.com> wrote in message
news:237aaff8.0409132008.2f48a3bb@posting.google.com...
> To run as CGI you must include a content header
>
> so while the Perl script:
>
> #!/usr/bin/perl -w
> print "Perl works\n";
>
> prints "Perl works" from the command line if you requested it from a
> browser you would receive a "Premature end of script headers" error.
> You'd have to define mime content header since the output of a CGI
> script can be anything from text to images to anything. So try this:
>
> #!/usr/bin/perl -w
> print "Content-type: text/html\n\n";
> print "Perl works\n";

So where's the HTML?

I think you meant

print "Content-type: text/plain\n\n";





------------------------------

Date: Tue, 14 Sep 2004 10:14:53 GMT
From: "Dave" <daveandniki@ntlworld.com>
Subject: Re: Problem with global text search using Regular Expressions
Message-Id: <xwz1d.89$ij5.49@newsfe6-win.ntli.net>


"Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
news:ci6eaa$qcn$1@mamenchi.zrz.TU-Berlin.DE...
> A. Sinan Unur <1usa@llenroc.ude.invalid> wrote in comp.lang.perl.misc:
> > jayalmehta@hotmail.com (Jayal) wrote in
news:e3932667.0409131452.6b9044a1
> > @posting.google.com:
> >
> > > Hi
> > > I am trying to perform a global search in a string using regular
> > > expressions.
> > >
> > > consider the string
> > >
> > > "attgccgccgccatt"
> > > If I wish to search for the string "ccgcc" within it, if I use the
> > > operation given below, I would get only one find
> > >
> > > $a =~ /ccgcc/g;
> > > $location = pos......
> > >
> > > which would be the find match.
> > > What do I do if I want to get both occurances?
> >
> > You'll need to read up on your Perl regexes. There 'ccgcc' occurs only
> > once in the string above. Once a match is made, the search for a next
one
> > does starts at the third 'g' in the source string.
> >
> > That is,
> >
> > my $s = 'attgccgccgccatt';
> >
> > while( $s =~ /ccgcc/g ) {
> >     print 'Position: ', pos $s, "\n";
> > }
> >
> > will only print 9.
> >
> > I remember seeing something to deal with this kind of a situation in the
> > Cookbook, but I cannot remember how it is done.
>
> It probably uses lookahead in place of a plain match.  Lookahead
> doesn't consume the characters it looks at, so it can detect overlapping
> matches.  It is still possible to capture the match "inside" the
> lookahead.  So
>
>     print "$\n" for $s =~ /(?=(ccgcc))/g;
>
> prints "ccgcc" twice.
>
> Anno

I presume you mean:

print "$_\n" for $s =~ /(?=(ccgcc))/g;

Dave




------------------------------

Date: 14 Sep 2004 10:17:28 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Problem with global text search using Regular Expressions
Message-Id: <ci6gfo$s5r$1@mamenchi.zrz.TU-Berlin.DE>

Dave <daveandniki@ntlworld.com> wrote in comp.lang.perl.misc:
> 
> "Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
> news:ci6eaa$qcn$1@mamenchi.zrz.TU-Berlin.DE...
> > A. Sinan Unur <1usa@llenroc.ude.invalid> wrote in comp.lang.perl.misc:
> > > jayalmehta@hotmail.com (Jayal) wrote in
> news:e3932667.0409131452.6b9044a1
> > > @posting.google.com:

[...]

> >     print "$\n" for $s =~ /(?=(ccgcc))/g;
> >
> > prints "ccgcc" twice.
> >
> > Anno
> 
> I presume you mean:
> 
> print "$_\n" for $s =~ /(?=(ccgcc))/g;

Yes, that's what I meant.

Anno


------------------------------

Date: 14 Sep 2004 12:48:46 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Problem with global text search using Regular Expressions
Message-Id: <Xns956459A671446asu1cornelledu@132.236.56.8>

anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in
news:ci6eaa$qcn$1@mamenchi.zrz.TU-Berlin.DE: 

> A. Sinan Unur <1usa@llenroc.ude.invalid> wrote in comp.lang.perl.misc:

>> I remember seeing something to deal with this kind of a situation in
>> the Cookbook, but I cannot remember how it is done.
 
> It probably uses lookahead in place of a plain match.

Thanks Anno. Should've thought of that but I rarely use anything other than 
the most basic regexes. Thanks also to Matt for reminding me that pos 
returns an lvalue.

Sinan.


------------------------------

Date: 14 Sep 2004 12:59:48 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Problem with global text search using Regular Expressions
Message-Id: <ci6q04$3hg$1@mamenchi.zrz.TU-Berlin.DE>

A. Sinan Unur <1usa@llenroc.ude.invalid> wrote in comp.lang.perl.misc:
> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in
> news:ci6eaa$qcn$1@mamenchi.zrz.TU-Berlin.DE: 
> 
> > A. Sinan Unur <1usa@llenroc.ude.invalid> wrote in comp.lang.perl.misc:
> 
> >> I remember seeing something to deal with this kind of a situation in
> >> the Cookbook, but I cannot remember how it is done.
>  
> > It probably uses lookahead in place of a plain match.
> 
> Thanks Anno. Should've thought of that but I rarely use anything other than 
> the most basic regexes.

 ...which is as it should be.  Only a small regex is a good regex :)

Anno


------------------------------

Date: Tue, 14 Sep 04 10:16:49 GMT
From: jmfbahciv@aol.com
Subject: Re: Xah Lee's Unixism
Message-Id: <4146d85b$0$2665$61fed72c@news.rcn.com>

In article <60gbk01kj3h9rsvgikv7jahelsal0bfg1c@4ax.com>,
   Alan Balmer <albalmer@att.net> wrote:
>On Mon, 13 Sep 04 10:39:16 GMT, jmfbahciv@aol.com wrote:
>
>>>Responding in "hints" and ALL CAPS brings us to the ludicrous situation
>>>where a Turk gets to give a pointer to the ACLU to an American:
>>>
>>>http://www.aclu.org/SafeandFree/SafeandFree.cfm?ID=13079&c=207
>>
>>I'm not going to be able to get out to read that one.  Just
>>mentioning the ACLU gives me the bias that you're listening
>>with a BS filter.  ACLU has gone bonkers in that they've
>>become completely inconsist these days.
>
>This particular article isn't even consistent within itself. They try
>to make the reader equate "detainees" (most of whom have just been
>sent back home) and "secret arrests" which they somehow know all
>about. They also complain that "this group is almost entirely Arab,
>South Asian, or Muslim ...". Surprise, surprise.
>
>In fact, the article with its list of actions the ACLU has taken
>belies its own premise that all these things are happening in secret
>without any representation for the "victims."

Yea.  They seem to have taken logic lessons from Kerry.
>
>Years ago, I thought the ACLU was a Good Thing.

I agreed with a few things they did; I disagreed with a lot more.
However, I recognized that they were a good check on the
balances.  But their latest choices (not only the secret
detainee thing..there were others but I can't recall details)
have had me wondering about how do they come up with their
choices?  It's almost as if they cast lots to choose the
case and then flip a coin to see which side they'll defend.
Perhaps our pet lawyer^Wex-lawyer can explain this legal
logic.

/BAH



------------------------------

Date: Tue, 14 Sep 04 10:21:04 GMT
From: jmfbahciv@aol.com
Subject: Re: Xah Lee's Unixism
Message-Id: <4146d959$0$2665$61fed72c@news.rcn.com>

In article <vqgbk05ikqc0f95pnuk0i116e9vatrrdnj@4ax.com>,
   Alan Balmer <albalmer@att.net> wrote:
>On Sat, 11 Sep 04 14:24:09 GMT, jmfbahciv@aol.com wrote:
>
>> Now Congress is shifting towards giving them
>>more leeway.  I sure as hell hope they remember Hoover and his
>>abuses of power before they suggest putting one guy over it all.
>
>The suggestion has already been made, and President Bush is apparently
>going along with it, but refusing to give the position the unlimited
>power its proponents want. This gives the disloyal opposition grounds
>to claim he's not really serious about terrorism.

Reporting this has been terrible in this corner of the map.  I also
had understood that somebody was insisting that the position be
outside the cabinet.  I don't like this because it will ensure
a long-term head who will gradually get corrupt as Hooever did.
I also understand that making this a cabinet position will
"politicize" it but there isn't as much chance for having 100%
corruption.  

I also need a lesson on policizing.  Can't have a head of the
CIA be an ex-Congresscritter because that would politicize the
department.  But the CIA has been hogtied with politicizations
since Nixon.

/BAH


Subtract a hundred and four for e-mail.


------------------------------

Date: Tue, 14 Sep 04 10:33:10 GMT
From: jmfbahciv@aol.com
Subject: Re: Xah Lee's Unixism
Message-Id: <4146dc2f$0$2665$61fed72c@news.rcn.com>

In article <m3pt4qc57f.fsf@europa.pienet>,
   Greg Menke <gregm-news@toadmail.com> wrote:
>Chuck Dillon <spam@nimblegen.com> writes:
>
>> Antony Sequeira wrote:
>> 
>> > Chuck Dillon wrote:
>> > How is that related to Saqqddam Hussqqqqqain being a jackass and us
>> > spending 100 or whatever billions on removing him and having 1000+
>> > of Americans + unknown number of Iraqqqqqis getting killed. How does
>> > that help avoid
>> > 9 qqqq  11 or are you confused between Iraqqqqqis and Saudqqqqis ?
>> 
>> If you reread the post that you responded to you will see it has
>> nothing to do with Iraq.
>> 
>> However, to answer your question: How does regime change in Iraq help
>> avoid another 9/11...
>> 	1) It removes one of the states that might consider sponsing
>> such a future attach.
>
>Wouldn't it have made more sense to invade Saudi Arabia? 

No.  It would have been the stupidest thing to do.  Invasion
of Islam's holiest place would have ensure that this mess
turned into a 100% religious war.

> .. Thats where
>the terrorist money and terrorist leadership is from. 

IIRC, Hitler came from Austria.  So we should have only 
invaded Austria to gain control of Africa and Europe?

> .. Iraq is chump
>change on that account-

It's an ideal place.  It's located right in the middle of
all potential trouble makers; its people are more educated
than the other countries' populations so getting them
self-supporting doesn't need a cold start.  The country
was already an enemy who had violated terms of cease fire
over and over and over and over and over and over ...
again.

> .. heck, even Iran or Syria would've made a much
>better target on this basis.  Or are we such bullies that we'll pick
>the weakest kid to beat up to show how strong we are?

Yes.  It's a good plan and the cheapest.
<snip>

/BAH


------------------------------

Date: Tue, 14 Sep 04 10:35:01 GMT
From: jmfbahciv@aol.com
Subject: Re: Xah Lee's Unixism
Message-Id: <4146dc9e$0$2665$61fed72c@news.rcn.com>

In article <10kbafn3aq73p37@corp.supernews.com>,
   SM Ryan <wyrmwif@tango-sierra-oscar-foxtrot-tango.fake.org> wrote:
>Morten Reistad <firstname@lastname.pr1v.n0> wrote:
># In article <du73c1mk70b.fsf@mozart.cc.tut.fi>,
># Ville Vainio  <ville@spammers.com> wrote:
<snip  I don't like those pound sign prefix characters>

># >I'll raise you a Hitler, in a (probably vain) attempt to invoke the
># >Godwin's law.
># 
># OK, I'll raise that with a Ghengis Khan and a Pol Pot. 
>
>Hence the well known Usenet acronym PKB: Pol Khan Bloody.

I never saw that.  Is it new?

/BAH


Subtract a hundred and four for e-mail.


------------------------------

Date: 14 Sep 2004 08:53:56 -0400
From: Greg Menke <gregm-news@toadmail.com>
Subject: Re: Xah Lee's Unixism
Message-Id: <m3sm9lvwnv.fsf@europa.pienet>


jmfbahciv@aol.com writes:

> In article <m3pt4qc57f.fsf@europa.pienet>,
>    Greg Menke <gregm-news@toadmail.com> wrote:
> >Chuck Dillon <spam@nimblegen.com> writes:
> >
> >> Antony Sequeira wrote:
> >> 
> >> > Chuck Dillon wrote:
> >> > How is that related to Saqqddam Hussqqqqqain being a jackass and us
> >> > spending 100 or whatever billions on removing him and having 1000+
> >> > of Americans + unknown number of Iraqqqqqis getting killed. How does
> >> > that help avoid
> >> > 9 qqqq  11 or are you confused between Iraqqqqqis and Saudqqqqis ?
> >> 
> >> If you reread the post that you responded to you will see it has
> >> nothing to do with Iraq.
> >> 
> >> However, to answer your question: How does regime change in Iraq help
> >> avoid another 9/11...
> >> 	1) It removes one of the states that might consider sponsing
> >> such a future attach.
> >
> >Wouldn't it have made more sense to invade Saudi Arabia? 
> 
> No.  It would have been the stupidest thing to do.  Invasion
> of Islam's holiest place would have ensure that this mess
> turned into a 100% religious war.

They're pretty convinced of that already- after all Dubya called this
a crusade from day 1.  I thought this war was about threats, not
superstition.  You wingers keep changing it around.  In what way would
invading and occupying a country that supplies, trains, funds the
terrorists who performed 9/11 be the supidest thing?  Isn't the
stupidest thing really invading a country that neither trained nor
harbored 9/11 terrorists or even had much of any weapons suitable for
attacking a neighbor country?  If we invaded Iraq simply because its
<easier>, and then back off from laying waste to whatever we want
whenever we want inside the country, then we're not really sending a
convincing message are we?  And then, if we choose to get tough and
carpet bomb any city with insurgent activity, then we become the evil
country that we're accused of being.  This is one of the faces of
quagmire & we're stuck in it.

Kicking around the weak kids does not impress another bully enough to
leave you alone, you have to beat him up.  We started doing so in
Afganistan, then blew it in Iraq.

 
> > .. Thats where
> >the terrorist money and terrorist leadership is from. 
> 
> IIRC, Hitler came from Austria.  So we should have only 
> invaded Austria to gain control of Africa and Europe?

But Hitler was a real threat to his neighbors and was occupying other
countries.  Saddam could hardly feed his own troops much less invade
anybody.  10 years ago was different, I'm not vastly fond of Dubya
Sr., but I think he did the right things in Iraq; he was a better
president than his son in all respects.

 
> > .. Iraq is chump
> >change on that account-
> 
> It's an ideal place.  It's located right in the middle of
> all potential trouble makers; its people are more educated
> than the other countries' populations so getting them
> self-supporting doesn't need a cold start.  The country
> was already an enemy who had violated terms of cease fire
> over and over and over and over and over and over ...
> again.

Are you really advocating that we invade, depose, occupy, torture and
kill all for foreign policy convience?  And what in the world makes
you think the Iraqi economy is going to be self-sufficient anytime in
the next 5 years?  Their economy was a top to bottom disaster, a new
one isn't "started", its grown.  You'll be happy pumping untold
billions of dollars into their economy over there as long as you don't
have to pay for it with taxes over here.  GOP fantasy-land.

The "violations" of the cease-fire were the equivalent of kids
throwing rocks at passing airplanes.  Big deal.  Saddam's luck was
going to run out at some point- and keeping the lid on him was VASTLY
cheaper than taking over his country.

Well, you've gotten your legally entitled revenge- I hope you like it.


> > .. heck, even Iran or Syria would've made a much
> >better target on this basis.  Or are we such bullies that we'll pick
> >the weakest kid to beat up to show how strong we are?
> 
> Yes.  It's a good plan and the cheapest.

So you're feeling pretty good about the bodycount these days.  How
many dead US soldiers and Iraqiis will slake your bloodlust?

I will look forward to your spirited defense of any country in the
world invading another simply because they can & feel like it.

Gregm


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 7104
***************************************


home help back first fref pref prev next nref lref last post