Re: printing hash having undefined key

2014-06-23 Thread Shaji Kalidasan
Hi Sunita, In Perl hash keys can contain undef, blank space or a tab. All these entities are valid and as a result it will print the key/value pair for the undef also. For clarity I have added the values 'blank space' and a tab in your example Example 1: [code] @array = ("abc", 123, "d

Re: Printing hash of hashes

2004-06-25 Thread Randal L. Schwartz
> "Lrmk" == Lrmk <[EMAIL PROTECTED]> writes: Lrmk> I used this code In a ASP code to display the entire content of hashes Lrmk> I did some changes to neke it pure perl it should be good for your job Instead of the core-module Data::Dumper? Why write your own? -- Randal L. Schwartz - Stone

Re: Printing hash outside of foreach loop

2004-06-25 Thread James Edward Gray II
On Jun 25, 2004, at 10:12 AM, Daniel Falkenberg wrote: Hi Wiggins, Thank you for your reply. I will go and use the Finance::Quote::ASX module. For now though this problem is really bugging me and for my own sake I would like to get it to work. I have declared all my variables and am using warning

RE: Printing hash of hashes

2004-06-25 Thread Bob Showalter
LRMK wrote: > if ($hash{$k} =~ m/=HASH/){ if (ref($hash{$k}) eq 'HASH') { perldoc -f ref -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Printing hash of hashes

2004-06-24 Thread LRMK
I used this code In a ASP code to display the entire content of hashes I did some changes to neke it pure perl it should be good for your job ex:- printIt("", %hashToPrint); sub printIt($%){ my ($myfix, %hash)[EMAIL PROTECTED]; foreach my $k(sort keys %hash){ print "$myfix $k\t=\t$hash{$

Re: Printing hash of hashes

2004-06-24 Thread Gunnar Hjalmarsson
Daniel Falkenberg wrote: I need to print my hash of hashes. For example... How can I print that in a readable format. Then I would like to be able to print for example... Simpsons, Lead, homer. Any ideas? http://www.perldoc.com/perl5.8.4/pod/perldsc.html -- Gunnar Hjalmarsson Email: http://www.gu

RE: Printing hash of hashes

2004-06-24 Thread Bob Showalter
Daniel Falkenberg wrote: > Hello All, > > I need to print my hash of hashes. For example... > > %HoH = ( > flintstones => { > lead => "fred", > pal => "barney", > }, > jetsons => { > lead => "george", >

RE: printing hash

2002-12-05 Thread Beau E. Cox
Hi Durate - I've never used these, but I'll bet one of them works for you: Tie-InsertOrderHash-0.01: insert-order-preserving tied hash [ download / quickinstall ] CPAN directory: B/BI/BINKLEY (B. K. Oxley (binkley)) Category >> Data Type Utilities >> Tie --

Re: printing hash of a hash

2002-09-12 Thread david
Marija Silajev wrote: > Hi, > > I create a hash like following: > > > $Data{$KEYS} = { key1 => [@array1], > key2 => [@array2], > }; > > > with: > foreach $KEYS ( keys %Data){ > print "Key1 data : @{$Data{$KEYS}{key1}}\n"; > } > > I manage to print the w

RE: printing hash of a hash

2002-09-11 Thread NYIMI Jose (BMB)
A second loop: foreach $KEYS ( keys %Data){ print "Key1 data :\n"; map{ print $_,"\n" } @{$Data{$KEYS}{key1}}; } José. -Original Message- From: Marija Silajev [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11, 2002 2:43 PM To: Perl Subject: printing hash of a has

Re: printing hash of a hash

2002-09-11 Thread Sudarshan Raghavan
On Wed, 11 Sep 2002, Marija Silajev wrote: > Hi, > > I create a hash like following: > > > $Data{$KEYS} = { key1 => [@array1], > key2 => [@array2], > }; > > > with: > foreach $KEYS ( keys %Data){ > print "Key1 data : @{$Data{$KEYS}{key1}}\n"; > } > > I