Re: [Perl-unix-users] printing hash values in a special order

2007-04-09 Thread Mehta, Perdeep
Matt, Terrific! Thanks a lot. It really helped. perdeep -Original Message- From: Matt Schneider [mailto:[EMAIL PROTECTED] Sent: Monday, April 09, 2007 1:14 PM To: Mehta, Perdeep; perl-unix-users@listserv.ActiveState.com Subject: RE: [Perl-unix-users] printing hash values in a special

[Perl-unix-users] printing hash values in a special order

2007-04-09 Thread Mehta, Perdeep
Hi, I have a hash with even numbers followed by odd numbers as values that I want to print in a certain order. I have tried my self several hours but couldn't work this out. Here is an example of input data. I will appreciate any help. %Values has following fields, name(Key) bands(Values) 143B

Re: [Perl-unix-users] perl Hash help

2007-01-24 Thread Mehta, Perdeep
This is something that I was looking for. But the messages from Andy and Bill are also helpful and interesting, taught me ways to tackle it differently. Thanks every one for the prompt response. perdeep Perdeep K. Mehta Hartwell Center for Bioinformatics & Biotechnology St. Jude Children's Resea

[Perl-unix-users] perl Hash help

2007-01-23 Thread Mehta, Perdeep
Hi, I am looking for help to retrieve from a Hash of Hashes in insertion order? I am not an expert in multi-dimensional Hashes, how could I use Tie::IxHash module with a sub-Hash, if I could? Here is an example, I want to retrieve from sub-hash %{$dir_contents->{$item} in the insertion order. I

RE: [Perl-unix-users] looping over

2005-02-24 Thread Mehta, Perdeep
bkert [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 23, 2005 6:55 PM To: Mehta, Perdeep Cc: perl-unix-users@listserv.ActiveState.com Subject: Re: [Perl-unix-users] looping over Mehta, Perdeep wrote: > Hi All, > > I want to loop over numbers 001 to 100 as index. For or foreach loops b

RE: [Perl-unix-users] looping over

2005-02-23 Thread Mehta, Perdeep
Thank you for the help. It works. pm -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 23, 2005 11:15 AM To: Mehta, Perdeep Subject: Re: [Perl-unix-users] looping over for (my $i = 001; $i < 100; $i++) { $padlen=3; $i = sprintf(

[Perl-unix-users] looping over

2005-02-23 Thread Mehta, Perdeep
Hi All, I want to loop over numbers 001 to 100 as index. For or foreach loops both convert the variable value, for example $i = 001 to $i = 1. I'm sure there is a way to explicitly get $i = 001 printed out, instead of $i = 1 that script automatically changes it to. for (my $i = 001; $i < 100;

RE: [Perl-unix-users] parsing multiple arrays

2004-08-18 Thread Mehta, Perdeep
Thank you everyone for responding to my question. perdeep -Original Message- From: Thomas, Mark - BLS CTR [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 9:26 AM To: Mehta, Perdeep Cc: Perl-Unix-Users (Perl-Unix-Users) Subject: RE: [Perl-unix-users] parsing multiple arrays In

[Perl-unix-users] parsing multiple arrays

2004-08-17 Thread Mehta, Perdeep
Hi, I have a set of 8 1D arrays each containing around 100 to 150 ids. I want to recursive parse each array to find what is common and unique across all 8 arrays and print that out. Does any one know of an algorithm or has an idea that recursively could do the task? Thanks in advance for your

RE: [Perl-unix-users] reading records in a file

2004-08-12 Thread Mehta, Perdeep
R [mailto:[EMAIL PROTECTED] Sent: Thursday, August 12, 2004 7:37 AM To: Mehta, Perdeep Cc: [EMAIL PROTECTED] Subject: RE: [Perl-unix-users] reading records in a file Mehta, Perdeep wrote: > Super! this works. > > I have one question, what are those spaces in between when I > print as below

RE: [Perl-unix-users] reading records in a file

2004-08-11 Thread Mehta, Perdeep
Super! this works. I have one question, what are those spaces in between when I print as below, e.g. foreach my $acc (keys %hash){ if ($acc =~ /1a1.f1b/) { print "[EMAIL PROTECTED]"; } } produces following output: 1a1.f1b TAAATAGAGAGGTTCGACTCTGCATTTCCCAAATACGTAATGCTTACGGTACACGACCCA A

[Perl-unix-users] reading records in a file

2004-08-11 Thread Mehta, Perdeep
Hi, I am looking for a solution to read a file with records that do not have end of each record delimiter. Here is an example, File: >1a1.f1b bases 100 to 234 (SL to QR) TAAATAGAGAGGTTCGACTCTGCATTTCCCAAATACGTAATGCTTACGGTACACGACCCA AGCTCTCTGCTTGAATCCCAAATCTGAGCGGACAGATGAGCGCAGAGGACAG GTT

RE: [Perl-unix-users] conversion between exponential and corresponding

2004-02-27 Thread Mehta, Perdeep
for Bioinformatics & Biotechnology St. Jude Children's Research Hospital Memphis, TN 38105-2794 Tel: 901-495 3774 http://www.hartwellcenter.org -Original Message- From: Bruce Hudson [mailto:[EMAIL PROTECTED] Sent: Friday, February 27, 2004 3:23 PM To: Mehta, Perdeep Subject: Re: [

[Perl-unix-users] conversion between exponential and corresponding integer value

2004-02-27 Thread Mehta, Perdeep
Dear Perl Gurus, I need help to convert an exponential value such as 10e-5 to its integer value and vice versa in a perl script. Thanks in advance for any help. perdeep Perdeep K. Mehta Hartwell Center for Bioinformatics & Biotechnology St. Jude Children's Research Hospital Memphis, TN 38105-27

RE: [Perl-unix-users] Perl help

2002-10-01 Thread Mehta, Perdeep
Thanks to all for very helpful analysis and suggestions. It is now working fine. perdeep Hartwell Center for Bioinformatics and Biotechnology St. Jude Children's Research Hospital Memphis, TN 38105 ___ Perl-Unix-Users mailing list [EMAIL PROTECTED] T

RE: [Perl-unix-users] Perl help

2002-10-01 Thread Mehta, Perdeep
That is right! perdeep Hartwell Center for Bioinformatics and Biotechnology St. Jude Children's Research Hospital Memphis, TN 38105 -Original Message- From: Anidil Rajendran-Raj [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 01, 2002 11:03 AM To: Sundara Rajan; Mehta, Pe

RE: [Perl-unix-users] Perl help

2002-09-30 Thread Mehta, Perdeep
PM To: 'Mehta, Perdeep' Subject: RE: [Perl-unix-users] Perl help I think the input file which u read passes some line which does not have $words[0] value pls have a look at ur input file -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mehta, Perde

RE: [Perl-unix-users] Perl help

2002-09-30 Thread Mehta, Perdeep
No! this did not change the behavior. perdeep -Original Message- From: Trevor Joerges [mailto:[EMAIL PROTECTED]] Sent: Monday, September 30, 2002 3:55 PM To: Mehta, Perdeep; [EMAIL PROTECTED] Subject: Re: [Perl-unix-users] Perl help Your printing to a filehandle OUT. What do you need

[Perl-unix-users] Perl help

2002-09-30 Thread Mehta, Perdeep
Hi All, I would appreciate any help on the following code. Here I fill the defln hash with the appropriate keys and values: use strict; use warnings; my %defln = (); while (my $line = ) { chop($line); if ($line =~ /^$/) { next; } else { my

RE: [Perl-unix-users] perl help

2002-05-02 Thread Mehta, Perdeep
http://www.hartwellcenter.org -Original Message- From: $Bill Luebkert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 8:04 PM To: Mehta, Perdeep Cc: '[EMAIL PROTECTED]' Subject: Re: [Perl-unix-users] perl help Mehta, Perdeep wrote: > Hi All, > > I'm beginner to pattern match

[Perl-unix-users] perl help

2002-05-01 Thread Mehta, Perdeep
Hi All, I'm beginner to pattern matching in Perl and was writing a code to parse a string. I tried pretty hard to extract the words that are of interest from a string but had no luck. Here is all-in-one-line string that I want to parse: $string = "biological process|mitosis|IEA|GO:0007067|MGD|na