[26854] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8872 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 20 21:05:37 2006

Date: Fri, 20 Jan 2006 18:05:05 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 20 Jan 2006     Volume: 10 Number: 8872

Today's topics:
        4601870216 Make MONEY fast 4601870216 <gxbazpxt@hetnet.nl>
    Re: Blather-Adjusting Programs <fart_deco@127.0.0.1>
    Re: Matching subsets of two strings <tadmc@augustmail.com>
    Re: Matching subsets of two strings <jweeb2342@hotmail.com>
    Re: Matching subsets of two strings <jurgenex@hotmail.com>
        mistake in my for <winter@yahoo.co.uk>
    Re: mistake in my for <xx087@freenet.carleton.ca>
        Regex to find paired characters only <usenet05@drabble.me.uk>
    Re: soap::lite for activeperl 5.8 <barbanegra_2005@yahoo.es>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 20 Jan 2006 23:58:32 +0100
From: "Hollowkiller" <gxbazpxt@hetnet.nl>
Subject: 4601870216 Make MONEY fast 4601870216
Message-Id: <43d171e8$0$10353$ba620dc5@nova.planet.nl>

       Pay it fast it will be great..!!!




hrFiX(QG.![R5;6:D:-<


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

Date: Fri, 20 Jan 2006 14:52:20 -0500
From: HOOHAH! <fart_deco@127.0.0.1>
Subject: Re: Blather-Adjusting Programs
Message-Id: <11t2frl8vo6u048@news.supernews.com>

vjp2.at@at.BioStrategist.dot.dot.com wrote:

> recursive rectal reversion

they are just hoping it's real... :)

-- 
Roberta "Foxymopjockeychickenwrist" Wolfe
        "The talk of the sekret AUK
        off-newsgroup listserves!"      

>>>>> Hmmmmmm. Is this the Mop Jockey or Alexa?

>>>> Moppy.

>>>Are you sure? It had an Alexa/babaloonie addy (one or the other, I
>>>forget which now)...

>> mop jockey started the "Fart Deco" froggery, which was then adopted by
>> the oh_brutha20002 sockpuppet machine/fanboi.  "FArt Deco" is/was
>> oh_brutha.

> Right, right...I still contend, however, that Alexa is the most likely
> candidate for the wearer of the oh_brutha/babaloonie sock, simply because
> the style resembles hers quite closely (IMO), posting through Google while
> also using a newsreader (Agent 2.0) is easy enough, and oh_brutha seems to
> be going after some of Alexa's favourite targets with much the same
> attitude as whereisthemoney.org. Plus, of course, she [isn't] happy if
> she isn't socking-up all the time...              

"Yes, Virginia. There is a bigger loser than the Mop Jockey." -> Kevin Fries
aka: Cujo DeSockpuppet                         


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

Date: Fri, 20 Jan 2006 14:18:30 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Matching subsets of two strings
Message-Id: <slrndt2hcm.dct.tadmc@magna.augustmail.com>

Jim Weeb <jweeb2342@hotmail.com> wrote:


> and then somehow see which items are in both arrays


So, you want the intersection of the two arrays.

   perldoc -q intersection

       How do I compute the difference of two arrays?  How do I compute the
       intersection of two arrays?


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 20 Jan 2006 15:19:52 -0000
From: Jim Weeb <jweeb2342@hotmail.com>
Subject: Re: Matching subsets of two strings
Message-Id: <0WKEAPU338737.9721296296@reece.net.au>

In article <dqqcdq$i40$1@mamenchi.zrz.TU-Berlin.DE>
anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
>
> Jim Weeb  <jweeb2342@hotmail.com> wrote in comp.lang.perl.misc:
> > Can anyone offer some help with perl and a script operating a
> > mail2news gateway?
> >
> > I'm using CPAN module email:simple so, I can get the groups into
> > variables using:
> >
> > $newsgroups=$mail->header("Newsgroups");
> > $followupto=$mail->header("Followup-To");
> >
> > Now, when processing the message, I only want to allow
> > followupto groups that are present in newsgroups - not any
> > alternative group(s). Group(s) in followupto may be listed in a
> > different order to those in the original newsgroups line.
> >
> > I guess I need to combine the groups in each variable into an
> > array:
> >
> > @newsgroups2 = split /,/ , $newsgroups ;
> > @followupto2 = split /,/ , $followupto ;
> >
> > and then somehow see which items are in both arrays and write
> > those that are to a new variable $followupto3 (or even back to
> > the original $followupto)
> >
> > I guess it would be done with two nested loops, however someone
> > previously mentioned something about a hash with regard to a
> > similar problem (and lost me completely). It could probably all
> > be done in one or two lines by a perl boffin, but unfortunately
> > my perl, although improving slowly, isn't quite up to the task.
>
> See the faq "How do I compute the difference of two arrays? ..."
> (perldoc -q difference).

Thanks, that appears to tell me the differences (although I'm n 
ot quite sure what values it puts in what arrays, I'll have to 
run it and find out). That's a slightly different problem than I 
have - I want to know which elements of array2 ARE present in 
array1.




























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

Date: Sat, 21 Jan 2006 00:20:56 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Matching subsets of two strings
Message-Id: <I7fAf.213$jO3.168@trnddc07>

Jim Weeb wrote:
> In article <dqqcdq$i40$1@mamenchi.zrz.TU-Berlin.DE>
> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
>> See the faq "How do I compute the difference of two arrays? ..."
>> (perldoc -q difference).
>
> Thanks, that appears to tell me the differences (although I'm n
> ot quite sure what values it puts in what arrays, I'll have to
> run it and find out). That's a slightly different problem than I
> have - I want to know which elements of array2 ARE present in
> array1.

Dude,

did you actually _read_ even just the full title of that FAQ?
Like the part that Anno marked with the ellipsis?

jue 




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

Date: Fri, 20 Jan 2006 21:30:03 +0100
From: "Olaf \"El BLanco\"" <winter@yahoo.co.uk>
Subject: mistake in my for
Message-Id: <dqrh8c$693$1@cormoran.emeteo.local>



for ($a=0; $a<$max; print "\t$a", $a++) {}
// OK, print 1 2 3 4 5 ... max

But

for ($a=0; $a<$max; $a++, print "\t$a") {}

// print 00 11 22 33 44... max-1max-1 ?





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

Date: 20 Jan 2006 20:40:15 GMT
From: Glenn Jackman <xx087@freenet.carleton.ca>
Subject: Re: mistake in my for
Message-Id: <slrndt2ilg.lha.xx087@smeagol.ncf.ca>

At 2006-01-20 03:30PM, Olaf "El BLanco" <winter@yahoo.co.uk> wrote:
>  
>  
>  for ($a=0; $a<$max; print "\t$a", $a++) {}
>  // OK, print 1 2 3 4 5 ... max
>  
>  But
>  
>  for ($a=0; $a<$max; $a++, print "\t$a") {}
>  
>  // print 00 11 22 33 44... max-1max-1 ?

You've got that backwards.  

Beware of the comma operator versus calling print with 2 arguments.  

-- 
Glenn Jackman
Ulterior Designer


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

Date: Sat, 21 Jan 2006 00:01:27 GMT
From: Graham Drabble <usenet05@drabble.me.uk>
Subject: Regex to find paired characters only
Message-Id: <Xns97523F5628Cgrahamdrabblelineone@ID-77355.user.dfncis.de>

I have the following data in a file

p p p p p p p p
p b b p p p p p
b b p p p p p
s b b p p p p p
p b b p b b p p
s b p p p p p p
s b b b p p p p
p b b b b b p p
b b p b p p p
b b b b p p p
p p p p p b b
p s b s p p p b

I'm looking to write a regular expression that will only match if a 
'b ' are paired together.

I've currently got

use strict;
use warnings;

open IN, '<', 'pb.txt' or die "Can't open IN: $!";

while (<IN>){
	chomp;
	my $regex;
	if (!/[sp] b [sp]/){
		$regex = 1;
	}else{
		$regex = 0;
	}

	print "$_\t $regex\n";
}

which produces

p p p p p p p p  1
p b b p p p p p  1
b b p p p p p    1
s b b p p p p p  1
p b b p b b p p  1
s b p p p p p p  0
s b b b p p p p  1
p b b b b b p p  1
b b p b p p p    0
b b b b p p p    1
p p p p p b b    1
p s b s p p p b  0

It should (if it was doing what I wanted!) produce

p p p p p p p p  1
p b b p p p p p  1
b b p p p p p    1
s b b p p p p p  1
p b b p b b p p  1
s b p p p p p p  0
s b b b p p p p  0   ****
p b b b b b p p  0   ****
b b p b p p p    0
b b b b p p p    1
p p p p p b b    1
p s b s p p p b  0

(The **** are not output but are there to indicate the lines that it 
gets wrong.)

The problem is that it treats 'b b b' as good where it shouldn't 
(although b b b b is fine).

Any suggestions?

-- 
Graham Drabble
http://www.drabble.me.uk/


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

Date: Sat, 21 Jan 2006 01:05:04 +0100
From: =?ISO-8859-1?Q?Paco_Guti=E9rrez?= <barbanegra_2005@yahoo.es>
Subject: Re: soap::lite for activeperl 5.8
Message-Id: <WUeAf.228357$yg1.193918@twister.auna.com>

Nospam escribió:
> where can I download this module?
> 
> 
I guess you can at CPAN (im new to perl, but i've read most perl modules 
are there)

Good Luck


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

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 8872
***************************************


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