Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

superfrink's scratchpad

by superfrink (Curate)
on Jul 03, 2004 at 20:20 UTC ( #371618=scratchpad: print w/ replies, xml ) Need Help??

[chad@thepurplebuffalo ~/w/x]$ date > asdf [chad@thepurplebuffalo ~/w/x]$ perl $now = localtime; rename 'asdf' , "$now asdf" [chad@thepurplebuffalo ~/w/x]$ ls -l *asdf* -rw------- 1 chad users 29 2006-10-28 22:02 Sat\ Oct\ 28\ 22:02:59\ 2 +006\ asdf
-----
#!/usr/bin/perl -w use strict; use Data::Dumper; my %hash = ( 'a' => [1, 'One'], 'b' => [2, 'Two'], 'c' => [3, 'Three'], 'd' => [4, 'Four'], 'e' => [5, 'Five'], 'f' => [6, 'Six'], 'g' => [12, 'Twelve'], ); my %key_ht; foreach my $key (keys %hash) { $key_ht{$hash{$key}[0]} = $key } print "key_ht:", Dumper(\%key_ht), "\n"; foreach my $key (sort { $a <=> $b } keys %key_ht) { my $num = $hash{$key_ht{$key}}[0]; my $str = $hash{$key_ht{$key}}[1]; print "Integer is: ", $num, " -- Alpha is: ", $str, "\n"; }
Don't click the following.
http://superfrink.net/tpb.net-xav/
xavier23perlmonks@thepurplebuffalo.net
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-08-30 01:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls