Re: Adding file contents into hashes

2011-06-07 Thread John W. Krahn
venkates wrote: Hi, Hello, This is a snippet of the data ENTRY K1 KO NAME E1.1.1.1, adh DEFINITION alcohol dehydrogenase [EC:1.1.1.1] PATHWAY ko00010 Glycolysis / Gluconeogenesis ko00071 Fatty acid metabolism ko00350 Tyrosine metabolism ko00625 Chloroalkane and chloroalkene degradation k

Adding file contents into hashes

2011-06-07 Thread venkates
Hi, This is a snippet of the data ENTRY K1 KO NAMEE1.1.1.1, adh DEFINITION alcohol dehydrogenase [EC:1.1.1.1] PATHWAY ko00010 Glycolysis / Gluconeogenesis ko00071 Fatty acid metabolism ko00350 Tyrosine metabolism

Re: Question/Problem with foreach loop

2011-06-07 Thread CM Analyst
Gents, Sorry for my delayed response. Thank you for your suggestions. Based on your feedback, I made the following changes, and the hook is now working as expected. Thanks a million! my $taskstate = $taskEntity->GetFieldValue(state)->GetValue();     $session->OutputDebugString ("Task's state

Re: List of Perl Features

2011-06-07 Thread sono-io
On Jun 7, 2011, at 3:48 PM, Shawn H Corey wrote: > See `perldoc perl` and search for: > > perlhistPerl history records > perldelta Perl changes since previous version > perl51311delta Perl changes in version 5.13.11 > perl51310del

Re: List of Perl Features

2011-06-07 Thread Shawn H Corey
On 11-06-07 06:38 PM, sono...@fannullone.us wrote: Is there a list of Perl features/removals (since version 5) and when they were introduced? I've searched for one but have come up empty handed. Something like this: Perl 5.10.0 introduced: given-when say Perl 5.12.0 intro

List of Perl Features

2011-06-07 Thread sono-io
Is there a list of Perl features/removals (since version 5) and when they were introduced? I've searched for one but have come up empty handed. Something like this: Perl 5.10.0 introduced: given-when say Perl 5.12.0 introduced: ... It would be nice to see at a glance

Re: how do i push a hashref into another hashref

2011-06-07 Thread Leo Lapworth
On 7 June 2011 17:48, Brian F. Yulga wrote: > Leo Lapworth wrote: >> On 7 June 2011 07:47, Agnello George  wrote: >>> >>> I got the following hashref >>> >> >> >> >>> >>> now i need to push $select_all_website into $selet_domU_data >>> >> >> I think this is what you want... >> >> use strict; >> u

Re: Modern Perl p. 33 "continue" -- what is a "with" loop?

2011-06-07 Thread John SJ Anderson
On Tue, Jun 7, 2011 at 16:02, Uri Guttman wrote: >> "DC" == David Christensen writes: >  DC> What is a "with" loop? > > looks like a mistake. no such animal. I think he probably means a 'when' block -- see the last paragraph in for an explan

Re: Modern Perl p. 33 "continue" -- what is a "with" loop?

2011-06-07 Thread Uri Guttman
> "DC" == David Christensen writes: DC> On p. 33 when discussing "continue", chromatic states: DC> "You may use it with a while, until, with, or for loop." DC> What is a "with" loop? looks like a mistake. no such animal. uri -- Uri Guttman -- u...@stemsystems.com -

Modern Perl p. 33 "continue" -- what is a "with" loop?

2011-06-07 Thread David Christensen
beginners: I'm reading "Modern Perl". I'm not sure where to get help with the technical content of the book. STFW I've found: http://onyxneon.com/books/modern_perl/index.html http://www.modernperlbooks.com/mt/index.html https://github.com/chromatic/modern_perl_book/wiki ht

Re: edit_file and edit_file_lines

2011-06-07 Thread Uri Guttman
> "JG" == Jim Green writes: JG> I tried my @texts = read_file( 'zcat filename.gz|' ) but it doesn't JG> work, could someone help with this syntax? I would use PerlIO::gz for JG> large files but prefer a simple call to get the content I want for JG> smaller files. read_file uses syso

Re: edit_file and edit_file_lines

2011-06-07 Thread Jim Green
On May 15, 1:28 am, u...@stemsystems.com ("Uri Guttman") wrote: > hi all, > > As with other releases of File::Slurp I think this list should be told > about it since this module is so easy to use and makes your Perl much > simpler and also faster. > > uri > > Have you ever wanted to use perl -pi in

Re: how do i push a hashref into another hashref

2011-06-07 Thread Shawn H Corey
On 11-06-07 12:48 PM, Brian F. Yulga wrote: Even though your way is short and concise, perhaps it's safer to check each key before assignment? Or you could make the new hash a hash of arrays: #!/usr/bin/env perl use strict; use warnings; use Data::Dumper; # Make Data::Dumper pretty $Data::D

Re: how do i push a hashref into another hashref

2011-06-07 Thread Brian F. Yulga
Leo Lapworth wrote: Hi Agnello, On 7 June 2011 07:47, Agnello George wrote: I got the following hashref now i need to push $select_all_website into $selet_domU_data I think this is what you want... use strict; use warnings; my $hash_ref_1 = { a => 1,

Re: how do i push a hashref into another hashref

2011-06-07 Thread Leo Lapworth
Hi Agnello, On 7 June 2011 07:47, Agnello George wrote: > I got the following hashref > now i need to push $select_all_website into $selet_domU_data I think this is what you want... use strict; use warnings; my $hash_ref_1 = { a => 1, b => 2, }; my $hash_ref_2 = { a =

Re: how do i push a hashref into another hashref

2011-06-07 Thread Shlomi Fish
Hi Agnello, On Tuesday 07 Jun 2011 11:04:58 Agnello George wrote: > On Tue, Jun 7, 2011 at 1:13 PM, marcos rebelo wrote: > > I don't understand what you are trying to do > > Ok , i got 2 hashes > > $hashref1 = [ { 'windows2 ' => { 'lvm' => ' windows2 8GB ram 50 GB HDD', > 'cpu' => 'na', 'ip'

Re: how do i push a hashref into another hashref

2011-06-07 Thread Uri Guttman
> "AG" == Agnello George writes: AG> $selet_domU_data = [ { 'windows2 ' => { 'lvm' => ' windows2 8GB ram 50 GB AG> HDD', AG> 'cpu' => 'na', AG> 'ip' => ' AG> 171.1

Re: how do i push a hashref into another hashref

2011-06-07 Thread Agnello George
On Tue, Jun 7, 2011 at 1:42 PM, Rob Coops wrote: > > > On Tue, Jun 7, 2011 at 8:47 AM, Agnello George > wrote: > >> HI >> >> I got the following hashref >> >> my $selet_domU_data = $DBH->selectall_hashref("select >> ram,ip,application,hosting,assigned_to,rdom0id from domU_info where >> server_n

Re: how do i push a hashref into another hashref

2011-06-07 Thread Rob Coops
On Tue, Jun 7, 2011 at 8:47 AM, Agnello George wrote: > HI > > I got the following hashref > > my $selet_domU_data = $DBH->selectall_hashref("select > ram,ip,application,hosting,assigned_to,rdom0id from domU_info where > server_name='$domU_server' ",'server_name' ); > > my $select_all_website =

Re: how do i push a hashref into another hashref

2011-06-07 Thread Uri Guttman
> "AG" == Agnello George writes: AG> i need to push $hashref2 into hashref1 that is the major flaw in your logic. you can't push into hashes. you can assign a hash ref to a slot in a hash. please use the correct terms as it will make it easier for you to be understood. AG> need to get

Re: how do i push a hashref into another hashref

2011-06-07 Thread Agnello George
On Tue, Jun 7, 2011 at 1:13 PM, marcos rebelo wrote: > I don't understand what you are trying to do > > > Ok , i got 2 hashes $hashref1 = [ { 'windows2 ' => { 'lvm' => ' windows2 8GB ram 50 GB HDD', 'cpu' => 'na', 'ip' => ' 171.16.1.10', 'application' => ' win2k8 ,sql,iis', 'hosting' => '', 'a

Re: how do i push a hashref into another hashref

2011-06-07 Thread marcos rebelo
I don't understand what you are trying to do On Tue, Jun 7, 2011 at 08:47, Agnello George wrote: > HI > > I got the following hashref > > my $selet_domU_data = $DBH->selectall_hashref("select > ram,ip,application,hosting,assigned_to,rdom0id from domU_info where > server_name='$domU_server' ",'s