Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How do I do < fill-in-the-blank > for each element in a hash?
How do I do < fill-in-the-blank > for each element in a hash?
✍: Guest
Here's a simple technique to process each element in a hash: #!/usr/bin/perl -w %days = ( 'Sun' =>'Sunday', 'Mon' => 'Monday', 'Tue' => 'Tuesday', 'Wed' => 'Wednesday', 'Thu' => 'Thursday', 'Fri' => 'Friday', 'Sat' => 'Saturday' ); foreach $key (sort keys %days) { print "The long name for $key is $days{$key}.\n"; }
2013-09-03, 1736👍, 0💬
Popular Posts:
What Is the "@SuiteClasses" Annotation? "@SuiteClasses" is a class annotation defined in JUnit 4.4 i...
How To Create an Add-to-My-Yahoo Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News ...
What is shadowing ? When two elements in a program have same name, one of them can hide and shadow t...
Which is the best place to store ConnectionString in Dot Net Projects? I am about to deploy my first...
What is the significance of Finalize method in .NET? .NET Garbage collector does almost all clean up...