Thank you very much for your answers. Yesterday I was so exhausted that my
brain didn't work and I didn't know how to explain what I was looking for.
Actually I was trying to do a perl script to compare two strings according
to the identity Blast program index (bioinformatics). As input file I have
On Thu, Sep 16, 2010 at 11:27, Jordi Durban wrote:
> Hi all!
> I would like to ask you something. I have a file as follows:
> File A File B
> uid = 1 uid = 4
> uid = 2 uid = 3
> uid = 3 uid = 2
> uid = 4 uid = 1
>
> I'm trying to make a perl script to get
On 2010.09.16 11:27, Jordi Durban wrote:
> Hi all!
> I would like to ask you something. I have a file as follows:
> File A File B
> uid = 1 uid = 4
> uid = 2 uid = 3
> uid = 3 uid = 2
> uid = 4 uid = 1
>
> I'm trying to make a perl script to get me only th
On Monday, May 13, 2002, at 12:36 , Jackson, Harry wrote:
[..]
>
> sub unique {
> foreach (@_) { $_{$_}++}
> return [keys %_];
> }
>
>
> Or you could butcher the grep method as I have done to get the following
>
> sub GrepMe {
> return [ grep { not $\{$_}++ } @_ ];
>
>-Original Message-
>From: drieux [mailto:[EMAIL PROTECTED]]
>>
>> sub unique {
>
>neat function
>
>> }
>
>may I counter propose based upon the benchmarks
>
>http://www.wetware.com/drieux/pbl/BenchMarks/uniqbyRefOrArray.txt
>
>ciao
>drieux
>
>---
>
>ps: harry, I have referenced
>-Original Message-
>From: drieux [mailto:[EMAIL PROTECTED]]
>
>ps: harry, I have referenced you as the originator
>of the function - if that is incorrect - please send
>me email back channel indicating who should be blamed.
I am indeed the culprit.
H
**
On Monday, May 13, 2002, at 07:07 , Jackson, Harry wrote:
[..]
>> -Original Message-
>> From: Lance Prais [mailto:[EMAIL PROTECTED]]
>
> I seem to require what you want a lot so wrote this. Pass the arrays you
> want the unique values of as references to this sub routine. There is no
> ch
>-Original Message-
>From: Lance Prais [mailto:[EMAIL PROTECTED]]
I seem to require what you want a lot so wrote this. Pass the arrays you
want the unique values of as references to this sub routine. There is no
checking for the amount of arrays passed and will currently handle 4.
su
On Mon, May 06, 2002 at 11:40:10AM -0700, drieux wrote:
>
> I'm very confused by the idea of
>
> my %args = (
> PARTITION => '',
> PARTITIONFILE => '',
> OUTPUTFILENAME => '',
> @_,
> );
>
> why not the simpler
>
> my (
On Monday, May 6, 2002, at 10:34 , Lance Prais wrote:
> Thank you in advance
http://www.wetware.com/drieux/CS/lang/Perl/Beginners/BenchMarks/FileWayuniqDeList.
txt
may help see the complications of doing this with File IO
I can understand the habit of 'directly porting' from /bin/sh
model
On Monday, May 6, 2002, at 10:34 , Lance Prais wrote:
> sub createUniquePartitionFile {
> my %args = (
> PARTITION => '',
> PARTITIONFILE => '',
> OUTPUTFILENAME => '',
> @_,
> );
> $status = 0;
> $partitionFile = $a
> I would like to create a unique list.
Buy the Cookbook or search the archives, since this is a common
question. Basically one of the following two solutions is best.
%seen = ();
@unique = grep { not $seen{$_}++ } @list_A, @list_B;
OR:
%seen = ();
$seen{$_}++ for @list_A, @list_B;
@unique =
12 matches
Mail list logo