Re: Blacklist an array

2003-03-04 Thread Scott R. Godin
John W. Krahn wrote: > "Scott R. Godin" wrote: >> >> use Quantum::Superpositions; >> >> my @notinarray1 = >> map { $_ } > ^^ > >> eigenstates( any(@Array2) ne all(@Array1) ); >> >> my @notinarray2 = >> map { $_ } > ^^ > >> ei

Re: Blacklist an array

2003-03-03 Thread John W. Krahn
"Scott R. Godin" wrote: > > use Quantum::Superpositions; > > my @notinarray1 = > map { $_ } ^^ > eigenstates( any(@Array2) ne all(@Array1) ); > > my @notinarray2 = > map { $_ } ^^ > eigenstates( any(@Array1) ne all(@Array2) );

Re: Blacklist an array

2003-03-03 Thread Scott R. Godin
Philipp Gruemmer wrote: > A small correction (thanks to Carlos Diaz) > >> Isn't shis code supposed to read the first line of the @input array then >> read the first line of the @blacklist array, see if the $line contains a >> $cond and then ptrint "true". After that it should carry on with the >>

Re: Blacklist an array

2003-02-21 Thread Philipp Gruemmer
Hi > Just /test/ . That _must_ work! It _better_ work or I am giving up > on perl :) Sure it does! I can hardly write these lines because my head is hurting so much (I was banging my head against the table). It took me the whole #*$ยง&'# day to figure out that the only mistake was the double occ

RE: Blacklist an array

2003-02-21 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Philipp Gruemmer wrote: > Hello Gary, > >> [gary@gary gary]$ cat t >> #!/usr/bin/perl -w >> >> my @input=('one','two','three'); >> my @blacklist=('two','four'); >> >> foreach $line (@input) { >> foreach $cond (@blacklist) { >> print "$line=$cond..."; >> if ($line=~/$cond/) { >> pr

RE: Blacklist an array

2003-02-21 Thread Beau E. Cox
Hi - > -Original Message- > From: Philipp Gruemmer [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 20, 2003 2:25 AM > To: [EMAIL PROTECTED] > Cc: Gary Stainburn > Subject: Re: Blacklist an array > > > Hello Gary, > > > [gary@gary gary]$ cat t >

Re: Blacklist an array

2003-02-21 Thread Philipp Gruemmer
Hello Gary, > [gary@gary gary]$ cat t > #!/usr/bin/perl -w > > my @input=('one','two','three'); > my @blacklist=('two','four'); > > foreach $line (@input) { > foreach $cond (@blacklist) { > print "$line=$cond..."; > if ($line=~/$cond/) { > print "true\n"; > last; > } >

Re: Blacklist an array

2003-02-21 Thread Gary Stainburn
On Thursday 20 Feb 2003 11:24 am, Philipp Gruemmer wrote: > Hello > > I'm just minutes away from bashing the famous 'head against the > monitor'. Here's my problem: > > I have an array, let's name it @input. Another array, @blacklist, > contains lines which should be matched against the @input arra

Re: Blacklist an array

2003-02-21 Thread Philipp Gruemmer
A small correction (thanks to Carlos Diaz) > Isn't shis code supposed to read the first line of the @input array then > read the first line of the @blacklist array, see if the $line contains a > $cond and then ptrint "true". After that it should carry on with the second > line from both arrays