in reply to Array to hash converstion
#!/usr/bin/perl -w use strict; my @value_pairs = qw (one abc two xyz); my %hash = @value_pairs; foreach my $key (keys %hash) { print "key $key is $hash{$key}\n"; } __END__ prints: key one is abc key two is xyz
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Array to hash converstion
by NetWallah (Canon) on Jul 15, 2009 at 05:26 UTC | |
by Marshall (Canon) on Jul 15, 2009 at 05:57 UTC |