Re: Fw: AW: Hash of Hashes

2009-09-29 Thread Uri Guttman
> "SD" == Soham Das writes: >> hashes have no positions, just keys. again. try to use standard >> terminology or you won't convey any proper meaning here. programming >> requires this to be accurate. and yes, you have been making a bunch of >> hash/array mistakes and you must fix that

Fw: AW: Hash of Hashes

2009-09-29 Thread Soham Das
- Forwarded Message From: Soham Das To: Uri Guttman Sent: Wednesday, 30 September, 2009 10:29:12 AM Subject: Re: AW: Hash of Hashes From: Uri Guttman To: Soham Das Cc: Thomas Bätzler ; beginners@perl.org Sent: Tuesday, 29 September, 2009 9:17

Re: HI

2009-09-29 Thread Jyoti
Thanks Jeff On Wed, Sep 30, 2009 at 4:40 AM, Jeff Peng wrote: > 2009/9/30 Jyoti : > > Thanks for reply Rajiv. Will go through.Also can you explain me what this > > error means: > > Odd number of elements in anonymous hash at > > /usr/lib/cgi-bin/websubroutine.pl line 18. > > That may mean, you p

Re: HI

2009-09-29 Thread Jeff Peng
2009/9/30 Jyoti : > Thanks for reply Rajiv. Will go through.Also can you explain me what this > error means: > Odd number of elements in anonymous hash at > /usr/lib/cgi-bin/websubroutine.pl line 18. That may mean, you passed wrong arguments to the method in a class. The method expects a hash, sho

Re: hash question

2009-09-29 Thread Shawn H Corey
Johnson, Reginald (GTS) wrote: Thanks to all that assisted in this thread. I think I am now getting where I want to go with using hashes. One comment that I could use clarification on is: JR(> for ( $i=0; $i <= $number_of_elements-1; $i++ ) { don't loop over indices, loop over

RE: hash question

2009-09-29 Thread Johnson, Reginald (GTS)
Thanks to all that assisted in this thread. I think I am now getting where I want to go with using hashes. One comment that I could use clarification on is: JR(> for ( $i=0; $i <= $number_of_elements-1; $i++ ) { don't loop over indices, loop over the data. JR(>

SOLVED re: GD::Text::Wrap

2009-09-29 Thread Jo for lists and groups
I think I had black text on a black bg or it was outside of the image. After some trial & error, I got it to work. Corrected version is below along with notes to clarify since I found the module notes to be scant. Jo #!/usr/bin/perl use strict; use warnings; use CGI; use GD; use GD::Text::Wra

Fwd: HI

2009-09-29 Thread Jyoti
Thanks for reply Rajiv. Will go through.Also can you explain me what this error means: Odd number of elements in anonymous hash at /usr/lib/cgi-bin/websubroutine.pl line 18. line 18 is as follows: print $q->header("text/html"),

Re: AW: Hash of Hashes

2009-09-29 Thread Shawn H Corey
Uri Guttman wrote: "SD" == Soham Das writes: SD> Lets assume, the hash of hash being a record of something which SD> has already happened and hence we know the final value, not SD> something which is right now happening, i.e changeable. you keep swapping hash and array concepts, words

Re: AW: Hash of Hashes

2009-09-29 Thread Uri Guttman
> "SD" == Soham Das writes: SD> Lets assume, the hash of hash being a record of something which SD> has already happened and hence we know the final value, not SD> something which is right now happening, i.e changeable. you keep swapping hash and array concepts, words and symbols. ple

HI

2009-09-29 Thread Jyoti
Hello, Can anyone help me to explain how to call subroutines. Also if possible, explain with example for running blast searches. Many Thanks.

Re: Arrays, Dates, Indexing and Initialisation

2009-09-29 Thread Dr.Ruud
Soham Das wrote: a... How do I initialise an array of a definite size with zero. Say the C equivalent of such a statement will be: int a[125]; for(i=0;i<125;i++) a[i]=0; You easily can, but why would you? It is often a sign of b

Re: Wants to migrate from one machine to another.

2009-09-29 Thread Raheel Hassan
Could you please write down the steps how to do that, I am using Ubuntu jaunty. On Tue, Sep 29, 2009 at 4:00 PM, Shawn H Corey wrote: > Raheel Hassan wrote: > >> Yes we know but the number of scripts is in hundreds, so it is very time >> consuming to identify the modules and then install, is the

Re: Wants to migrate from one machine to another.

2009-09-29 Thread Shawn H Corey
Raheel Hassan wrote: Yes we know but the number of scripts is in hundreds, so it is very time consuming to identify the modules and then install, is there any quick way. pmfind will find all installed modules, whether they're in use or not. http://github.com/shawnhcorey/pmfind To use: pmfind

Re: Wants to migrate from one machine to another.

2009-09-29 Thread Raheel Hassan
Yes we know but the number of scripts is in hundreds, so it is very time consuming to identify the modules and then install, is there any quick way. On Tue, Sep 29, 2009 at 3:18 PM, Jeff Peng wrote: > Since you know the scripts' names you may find what modules they are using: > > http://search.

Re: Wants to migrate from one machine to another.

2009-09-29 Thread Jeff Peng
Since you know the scripts' names you may find what modules they are using: http://search.cpan.org/~elliotjs/Module-Used-v1.2.0/lib/Module/Used.pm 2009/9/29 Raheel Hassan : > Hello, > > We have one software which is installed at one machine. The software was > developed by many developers(student

Wants to migrate from one machine to another.

2009-09-29 Thread Raheel Hassan
Hello, We have one software which is installed at one machine. The software was developed by many developers(students) as it was used in multiple projects in the lab, all the code is written in perl. Now we want to do the backup of that software for that we want to make one copy running on a new m

Re: Hash of Hashes

2009-09-29 Thread Shawn H Corey
Jeff Peng wrote: That's in Python? :-) Wouldn't know, don't do Python. Perl's both hash and array use (). But anonymous hash and array use {} and []. Hashes use {}, arrays use [], lists use (). When you set an element of a hash, you use {} to surround its key: $hash{$key} = $value; Wh

Re: Hash of Hashes

2009-09-29 Thread Chas. Owens
On Tue, Sep 29, 2009 at 07:40, Jeff Peng wrote: > 2009/9/29 Shawn H Corey : >> Soham Das wrote: >>> >>> How can I create a Hash of Hashes from two lists. Is it possible? >>> >>> I want the effective functionality to be served like this >>> >>> $ChildHash["Joe"]["21A"]="Sally" >>> >>> i.e Joe at 21

Re: get list of files sorted by date

2009-09-29 Thread Jeff Peng
2009/9/29 Andreas Moroder : > Hello, > > according to the man glob can only sort by name. Is there a way to get a > list of files sorted by date ? > sure. first I will use unix's ls command like ls -ltr. in perl one of the ways: my @sorted = map { $_->[0] } sort { $a->[1] <=> $b->[1]

Re: get list of files sorted by date

2009-09-29 Thread Алексеев Александр
print join "\n", sort {(stat $a)[8] <=> (stat $b)[8]} glob "./*"; -- Alexandr A Alexeev http://www.unixcommunity.net/ Andreas Moroder пишет: Hello, according to the man glob can only sort by name. Is there a way to get a list of files sorted by date ? Bye Andreas -- To unsubscribe, e-m

get list of files sorted by date

2009-09-29 Thread Andreas Moroder
Hello, according to the man glob can only sort by name. Is there a way to get a list of files sorted by date ? Bye Andreas -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Hash of Hashes

2009-09-29 Thread Jeff Peng
2009/9/29 Shawn H Corey : > Soham Das wrote: >> >> How can I create a Hash of Hashes from two lists. Is it possible? >> >> I want the effective functionality to be served like this >> >> $ChildHash["Joe"]["21A"]="Sally" >> >> i.e Joe at 21A has a child called Sally. List1 here will be the name of >

Re: how to do a `cp` on millions of files

2009-09-29 Thread pchristopher
Why not mirror the partitions ? Or If solaris. Ufsdump 0cf - |(cd ;ufsrestore -xf -) Sent from my Verizon Wireless BlackBerry -Original Message- From: Steve Bertrand Date: Mon, 28 Sep 2009 22:50:55 To: xufengnju Cc: beginners Subject: Re: how to do a `cp` on millions of files xufe

Re: AW: Hash of Hashes

2009-09-29 Thread Soham Das
Yes,its much more powerful, the way you said, but in my case it won't be necessary or important. Here I guess, I gave a wrong example where the data can be changed. Lets assume, the hash of hash being a record of something which has already happened and hence we know the final value, not some

AW: Hash of Hashes

2009-09-29 Thread Thomas Bätzler
Soham Das asked: > How can I create a Hash of Hashes from two lists. Is it possible? > > I want the effective functionality to be served like this > > $ChildHash["Joe"]["21A"]="Sally" > > i.e Joe at 21A has a child called Sally. List1 here will be the name of > Parents, List2 here will contain

Re: Hash of Hashes

2009-09-29 Thread Shawn H Corey
Soham Das wrote: How can I create a Hash of Hashes from two lists. Is it possible? I want the effective functionality to be served like this $ChildHash["Joe"]["21A"]="Sally" i.e Joe at 21A has a child called Sally. List1 here will be the name of Parents, List2 here will contain the house numbe

Hash of Hashes

2009-09-29 Thread Soham Das
How can I create a Hash of Hashes from two lists. Is it possible? I want the effective functionality to be served like this $ChildHash["Joe"]["21A"]="Sally" i.e Joe at 21A has a child called Sally. List1 here will be the name of Parents, List2 here will contain the house number. Soham

Re: Arrays, Dates, Indexing and Initialisation

2009-09-29 Thread Dr.Ruud
r...@i.frys.com wrote: Soham Das wrote: int a[125]; for(i=0;i<125;i++) a[i]=0; my @array; $array[$_] = 0 for 0..125; s/125/124/ -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: be

Re: Use Strict, Perl 5.10 and Global Symbol requires explicit package name

2009-09-29 Thread Soham Das
Shit!! Thanks, How asinine of me. From: Алексеев Александр To: Soham Das Cc: beginners@perl.org Sent: Tuesday, 29 September, 2009 2:52:26 PM Subject: Re: Use Strict, Perl 5.10 and Global Symbol requires explicit package name @dates and %dates are two dif

Re: Use Strict, Perl 5.10 and Global Symbol requires explicit package name

2009-09-29 Thread Алексеев Александр
@dates and %dates are two different variables in Perl. An error occurs, becouse %dates is not declared. -- Alexandr A Alexeev http://web20.su/ Soham Das пишет: Take a look at the following snippet of code: #!/usr/bin/perl use warnings; use strict; use Tie::Handle::CSV; #Read Market Data my $f

Use Strict, Perl 5.10 and Global Symbol requires explicit package name

2009-09-29 Thread Soham Das
Take a look at the following snippet of code: #!/usr/bin/perl use warnings; use strict; use Tie::Handle::CSV; #Read Market Data my $file1= shift @ARGV; my $file2= shift @ARGV; my $master_fh=Tie::Handle::CSV->new($file1,header=>1); my $transact_fh=Tie::Handle::CSV->new($file2,header=>1); #Date Extr

Re: Re: how to do a `cp` on millions of files

2009-09-29 Thread xufengnju
When It comes with million of files to copy from one place to another,there are two considerations: 1,performance 2,repeatable(fault tolerance),when it fails in-middle,it can continue with uncopied files.`cp -R` will not be ok for this because it begains from the very start, and `rsync` is good