Re: one query

2010-09-21 Thread Jordi Durban
Woops! Sorry! I hit "Reply", not "Reply all". And I know that I have to learn more Perl. Is a perl-beginner list isn't? Regards. 2010/9/21 Shlomi Fish > In accordance with: > > > > > > > Please reply to list if it's a mailing list post - > http://shlom.in/yreply > > > . >

Re: one query

2010-09-21 Thread Shlomi Fish
In accordance with: > > > > Please reply to list if it's a mailing list post - http://shlom.in/reply > > . And the fact the message was not explicitly stated as replied-to-in-private and the fact it does not appear to be the author's intention, I'm CCing this to the list. Next time please hit

Re: One query

2010-09-20 Thread Dr.Ruud
On 2010-09-20 14:16, wrote: while(){ Use of a File Handle in this case would be better my ($key, $value) = split (/\t/,$_); and Use "\s+" instead of "\t" . And even better, use the special ' '. -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands,

Re: One query

2010-09-20 Thread Whacky™
> while(){ Use of a File Handle in this case would be better >   my ($key, $value) = split (/\t/,$_); and Use "\s+" instead of "\t" . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: one query

2010-09-20 Thread Shlomi Fish
Hi Jordi, On Monday 20 September 2010 10:16:40 Jordi Durban wrote: > Hi all! > I have a file like this : > > colum acolum b > uid = 1 uid = 4 > uid = 2 uid = 3 > uid = 3 uid = 2 > uid = 4 uid = 1 > > I'm trying to find those columns with the same numbers

one query

2010-09-20 Thread Jordi Durban
Hi all! I have a file like this : colum acolum b uid = 1 uid = 4 uid = 2 uid = 3 uid = 3 uid = 2 uid = 4 uid = 1 I'm trying to find those columns with the same numbers regardless the colum they are. That's, in the example, the row 2 is identital to row 3.

Re: One query

2010-09-19 Thread Uri Guttman
> "PK" == Parag Kalra writes: PK> use strict; PK> use warnings; good. PK> my %mean_values; PK> while(){ PK> chomp; PK> my ($key, $value) = split (/\t/,$_); PK> if ( exists $mean_values{$key} ){ PK> push @{$mean_values{$key}}, $value; PK> } else { PK>

Re: One query

2010-09-19 Thread Parag Kalra
Hope this helps: #!/usr/bin/perl # Author: Parag Kalra # Date: 19-SEPT-2010 use strict; use warnings; my %mean_values; while(){ chomp; my ($key, $value) = split (/\t/,$_); if ( exists $mean_values{$key} ){ push @{$mean_values{$key}}, $value; } else { ${$mean_values{$key}}[

Re: One query

2010-09-17 Thread Uri Guttman
> "a:" == anamika : writes: a:> I have a file like this: a:> NM_003273 1929.19 a:> NM_053056 4662.262 a:> NM_053056 5728.343 a:> NM_024099 4009.705 a:> NM_001085372685.4568 a:> NR_003098 4700.29 a:> NM_199337 2727.46 a:> NM_018093

One query

2010-09-17 Thread anamika :
Hello, I have a file like this: NM_003273 1929.19 NM_053056 4662.262 NM_053056 5728.343 NM_024099 4009.705 NM_001085372685.4568 NR_003098 4700.29 NM_199337 2727.46 NM_018093 477.2938 NM_018093 813.0701 I want it to be something like: If the el