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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help with Fixed width File Parsing sate911 UNIX Desktop for Dummies Questions & Answers 4 05-19-2008 08:18 AM
Changing particular field in fixed width file dsravan Shell Programming and Scripting 4 02-11-2008 03:08 PM
Converting a Delimited File to Fixed width file raghavan.aero Shell Programming and Scripting 2 06-06-2007 11:44 AM
adding delimiter to a fixed width file sumeet Shell Programming and Scripting 2 03-21-2007 07:19 AM
Fixed Width file using AWK alok.benjwal UNIX for Dummies Questions & Answers 2 12-05-2005 08:39 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 02-09-2008
Registered User
 

Join Date: Jan 2008
Posts: 328
A tutorial on complex data structures:

perldsc - perldoc.perl.org
Reply With Quote
Forum Sponsor
  #9  
Old 02-10-2008
Registered User
 

Join Date: Feb 2008
Posts: 6
Code:
   $names{"$first,$last"}{count}++;
This is indeed much simpler looking. I will take a stab at describing this line: This hash idiom associates each $first,$last element with it's count.

Code:
 $names{"$first,$last"}{name} = "$first $mi $last $state",
This hash idiom associates the full record ($first $mi $last $state) with each $first,$last instance in hash %names.

If my language is not correct in this description, then my thinking is also incorrect. I am going to reread this article on hashes by Simon Cozens:
perl.com: Hash Crash Course and try to get a fuller understanding.

Thanks.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0