Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

superfrink's scratchpad

by superfrink (Curate)
on Jul 03, 2004 at 20:20 UTC ( [id://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
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-20 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found