This commit is contained in:
Nick Bebout 2013-12-29 20:03:13 -06:00
parent 8f266abab8
commit 6a0efa6bc8
86 changed files with 1747 additions and 28151 deletions

37
W/learn/hashes_set Executable file
View file

@ -0,0 +1,37 @@
#!/usr/bin/perl -w
use Data::Dumper ;
use strict ;
my %hash_1 = (
'abcd' => 'zzz',
'efgh' => 'zzz',
) ;
my %hash_2 = (
'2345' => 'zzz',
'8888' => 'zzz',
'efgh' => 'zzz',
) ;
print Data::Dumper->Dump( [ \%hash_1 ] ) ;
my %hash_X ;
foreach my $k ( keys( %hash_1 ) ) {
$hash_X{ $k }->{ 'folder_1' } ++ ;
}
foreach my $k ( keys( %hash_2 ) ) {
$hash_X{ $k }->{ 'folder_2'} ++ ;
}
foreach my $k ( keys( %hash_1 ) ) {
$hash_X{ $k }->{ 'folder_1' } ++ ;
}
print Data::Dumper->Dump( [ \%hash_X ] ) ;
print keys( %{ $hash_X{ 'efgh' } } ) ;