mirror of
https://github.com/imapsync/imapsync.git
synced 2025-08-01 23:01:49 +02:00
1.580
This commit is contained in:
parent
8f266abab8
commit
6a0efa6bc8
86 changed files with 1747 additions and 28151 deletions
37
W/learn/hashes_set
Executable file
37
W/learn/hashes_set
Executable 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' } } ) ;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue