The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
perl help on hash aju_kup Shell Programming and Scripting 3 07-12-2008 07:53 PM
Perl Hash Harikrishna Shell Programming and Scripting 1 06-04-2008 08:03 AM
Perl Hash Harikrishna Shell Programming and Scripting 1 06-03-2008 12:45 AM
Hash in perl Harikrishna Shell Programming and Scripting 1 06-02-2008 05:00 AM
perl hash question hankooknara Shell Programming and Scripting 3 07-28-2007 02:31 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-19-2009
littleboyblu littleboyblu is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 39
perl hash

i have an hash table in which each value is an array. How can i print for each key the array values??? something like this:

Quote:
key1 array[0] array[1] ... array[n]
key2 array[0] array[1] ... array[n]
....
thanks
  #2 (permalink)  
Old 03-19-2009
pludi's Avatar
pludi pludi is online now Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,950
perldoc -f keys and 2 loops (one for the hash, one for the elements of the arrays). If you managed to build such a structure you should be able to go from here, except of course if this is homework.
  #3 (permalink)  
Old 03-19-2009
KevinADC KevinADC is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2008
Posts: 731
How you do it depends on how you want to print them. This link should help:

perldsc - perldoc.perl.org
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:42 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0